IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 19, 2006, 2:55:43 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION to 0.30
add psTime support to the psdb templates

File:
1 edited

Legend:

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

    r7670 r9668  
    1111)
    1212{
    13     psMetadata      *md;
    14     bool            status;
     13[% INCLUDE metadata_from_params -%]
    1514
    16     md = psMetadataAlloc();
    17 [% FOREACH item = table.columns -%]
    18 [% IF item.type == "S32" or item.type == "F32" or item.type == "F64" -%]
    19     if (!psMetadataAdd[% item.type %](md, PS_LIST_TAIL, "[% item.name %]", 0, NULL, [% item.name %])) {
    20 [% ELSIF item.type == "STR" -%]
    21     if (!psMetadataAddStr(md, PS_LIST_TAIL, "[% item.name %]", 0, NULL, [% item.name %])) {
    22 [% ELSIF item.type == "BOOL" -%]
    23     if (!psMetadataAdd(md, PS_LIST_TAIL, "[% item.name %]", PS_DATA_BOOL, NULL, [% item.name %])) {
    24 [% END -%]
    25         psError(PS_ERR_UNKNOWN, false, "failed to add item [% item.name %]");
    26         psFree(md);
    27         return false;
    28     }
    29 [% END -%]
    30 
    31     status = psDBInsertOneRow(dbh, [% table.namespace FILTER upper %]_TABLE_NAME, md);
     15    bool status = psDBInsertOneRow(dbh, [% table.namespace FILTER upper %]_TABLE_NAME, md);
    3216    psFree(md);
    3317
Note: See TracChangeset for help on using the changeset viewer.