Changeset 3865
- Timestamp:
- May 5, 2005, 6:30:50 PM (21 years ago)
- Location:
- trunk/glueforge/templates/psdb
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/glueforge/templates/psdb/code.tt
r3504 r3865 1 #include "[% table_name %]db.h"1 #include "[% namespace %]db.h" 2 2 3 3 [% INCLUDE init.tt %] -
trunk/glueforge/templates/psdb/create.tt
r3597 r3865 1 bool [% table_name %]CreateTable(psDB *dbh) {1 bool [% namespace %]CreateTable(psDB *dbh) { 2 2 psMetadata *md; 3 3 bool status; … … 20 20 [%- i = i + 1 %] 21 21 [%- END %] 22 status = psDBCreateTable(dbh, "[% table_name %]", md);22 status = psDBCreateTable(dbh, "[% namespace FILTER upper %]_TABLE_NAME", md); 23 23 psFree(md); 24 24 -
trunk/glueforge/templates/psdb/init.tt
r3506 r3865 1 psDB *[% table_name %]Init(const char *host, const char *user, const char *passwd, const char *dbname) {1 psDB *[% namespace %]Init(const char *host, const char *user, const char *passwd, const char *dbname) { 2 2 3 3 psDB *dbh; -
trunk/glueforge/templates/psdb/insert.tt
r3581 r3865 1 bool [% table_name %]Insert(psDB * dbh,1 bool [% namespace %]Insert(psDB * dbh, 2 2 [%- SET i = 0 -%] 3 3 [%- FOREACH item = columns -%] … … 22 22 [%- i = i + 1 %] 23 23 [%- END %] 24 status = psDBInsertOneRow(dbh, "[% table_name %]", row);24 status = psDBInsertOneRow(dbh, "[% namespace FILTER upper %]_TABLE_NAME", row); 25 25 psFree(row); 26 26 -
trunk/glueforge/templates/psdb/makefile.tt
r3581 r3865 6 6 7 7 8 objects=[% table_name %]db.o8 objects=[% namespace %]db.o 9 9 10 all: lib[% table_name %]db.so10 all: lib[% namespace %]db.so 11 11 12 lib[% table_name %]db.so: $(objects)13 $(CC) $(CFLAGS) -shared -o lib[% table_name %]db.so $(objects) $(LIBS)12 lib[% namespace %]db.so: $(objects) 13 $(CC) $(CFLAGS) -shared -o lib[% namespace %]db.so $(objects) $(LIBS) 14 14 15 15 $(objects): %.o : %.c
Note:
See TracChangeset
for help on using the changeset viewer.
