IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2005, 11:55:33 AM (21 years ago)
Author:
jhoblitt
Message:

add const to params where appropriate
tt cleanup

File:
1 edited

Legend:

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

    r4012 r4196  
    11bool [% namespace %]Insert(psDB * dbh,
    2     [%- SET i = 0 -%]
    3     [%- FOREACH item = columns -%]
    4         [%- IF i == 0 -%]
    5             [%- i = 1 -%]
    6  
    7         [%- ELSE -%]
    8 ,
    9         [%- END -%]
    10         [%- item.ctype %] [% item.name %]
    11         [%- i = i + 1 -%]
    12     [%- END -%]
     2[%- SET i = 0 -%]
     3[% FOREACH item = columns -%]
     4[% IF i == 0 %][% i = 1 %] [% ELSE %], [% END -%]
     5[% IF item.type == "STR" -%]
     6const char *[% item.name %]
     7[%- ELSE -%]
     8[% item.ctype %] [% item.name %]
     9[%- END -%]
     10[% END -%]
    1311)
    1412{
     
    1715
    1816    row = psMetadataAlloc();
    19     [%- FOREACH item = columns %]
     17[% FOREACH item = columns %]
    2018    psMetadataAdd(row, PS_LIST_TAIL, "[% item.name %]", [% item.mtype %], NULL, [% item.name %]);
    21     [%- END %]
     19[% END -%]
     20
    2221    status = psDBInsertOneRow(dbh, [% namespace FILTER upper %]_TABLE_NAME, row);
    2322    psFree(row);
Note: See TracChangeset for help on using the changeset viewer.