IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 6, 2006, 6:46:10 PM (21 years ago)
Author:
jhoblitt
Message:

fix tests to work with per table data
minor pslib 0.9.0 compatibility fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/glueforge/templates/psdb/insert_c.tt

    r5907 r5950  
    77int main ()
    88{
    9     psDB            *dbh;
     9[% FOREACH table = tables -%]
     10    {
     11        psDB            *dbh;
    1012
    11     dbh = psDBInit("localhost", "test", NULL, "test");
    12     if (!dbh) {
    13         exit(EXIT_FAILURE);
    14     }
     13        dbh = psDBInit("localhost", "test", NULL, "test");
     14        if (!dbh) {
     15            exit(EXIT_FAILURE);
     16        }
    1517
    16     if (![% table.namespace %]Insert(dbh,
     18        if (![% table.namespace %]Insert(dbh,
    1719[%- SET i = 0 -%]
    1820[%- FOREACH item = table.columns -%]
     
    2022[%- END -%]
    2123)) {
    22         exit(EXIT_FAILURE);
     24            exit(EXIT_FAILURE);
     25        }
     26
     27        psDBCleanup(dbh);
    2328    }
    2429
    25     psDBCleanup(dbh);
    26 
     30[% END -%]
    2731    exit(EXIT_SUCCESS);
    2832}
Note: See TracChangeset for help on using the changeset viewer.