Skip to content

Commit

Permalink
added a few more minor "test"s
Browse files Browse the repository at this point in the history
  • Loading branch information
jpr5 committed Jan 21, 2004
1 parent e95e78c commit c39a098
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test.cc
Expand Up @@ -135,7 +135,15 @@ void orapp_select_straight(ORAPP::Connection &db) {
ORAPP::Row *r;

while ((r = q->fetch())) {
printf("::: rows fetched = %u\n", q->rows());
printf("::: rows fetched = %u, width = %u\n", q->rows(), r->width());

unsigned i;
for (i = 0; i < r->width(); i++)
printf("::: row%u named %s\n", i, r->name(i));

i = 42;
printf("::: row%u named %s (should be NULL)\n", i, r->name(i));

printf("::: (name) id = %u, str = [%s], unknown = [%s]\n",
(unsigned)(*r)["id"], (const char *)(*r)["str"], (const char *)(*r)["unknown"]);
printf("::: (row) id = %u, str = [%s], unknown = [%s]\n",
Expand Down

0 comments on commit c39a098

Please sign in to comment.