Changeset 5960
- Timestamp:
- Jan 10, 2006, 12:48:48 PM (21 years ago)
- Location:
- trunk/glueforge/templates/psdb
- Files:
-
- 9 edited
-
cleanup.tt (modified) (1 diff)
-
cleanup_h.tt (modified) (1 diff)
-
code.tt (modified) (1 diff)
-
header.tt (modified) (1 diff)
-
init.tt (modified) (1 diff)
-
init_h.tt (modified) (1 diff)
-
pop.tt (modified) (1 diff)
-
popfits.tt (modified) (1 diff)
-
top_makefile_am.tt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/glueforge/templates/psdb/cleanup.tt
r5907 r5960 1 void [% table.namespace %]Cleanup(psDB *dbh)1 void [% pkg_namespace %]Cleanup(psDB *dbh) 2 2 { 3 3 psDBCleanup(dbh); -
trunk/glueforge/templates/psdb/cleanup_h.tt
r5907 r5960 2 2 */ 3 3 4 void [% table.namespace %]Cleanup(4 void [% pkg_namespace %]Cleanup( 5 5 psDB *dbh ///< Database handle 6 6 ); -
trunk/glueforge/templates/psdb/code.tt
r5907 r5960 7 7 #define MAX_STRING_LENGTH 1024 8 8 9 [% INCLUDE init.tt %] 10 [% INCLUDE cleanup.tt %] 9 11 [% FOREACH table = tables -%] 10 12 [% INCLUDE alloc.tt %] 11 [% INCLUDE init.tt %]12 [% INCLUDE cleanup.tt %]13 13 [% INCLUDE createtable.tt %] 14 14 [% INCLUDE droptable.tt %] -
trunk/glueforge/templates/psdb/header.tt
r5907 r5960 11 11 /// @{ 12 12 13 [% INCLUDE init_h.tt %] 14 [% INCLUDE cleanup_h.tt %] 13 15 [% FOREACH table = tables -%] 14 16 [% INCLUDE object_h.tt %] 15 17 [% INCLUDE alloc_h.tt %] 16 [% INCLUDE init_h.tt %]17 [% INCLUDE cleanup_h.tt %]18 18 [% INCLUDE createtable_h.tt %] 19 19 [% INCLUDE droptable_h.tt %] -
trunk/glueforge/templates/psdb/init.tt
r5907 r5960 1 psDB *[% table.namespace %]Init(const char *host, const char *user, const char *passwd, const char *dbname)1 psDB *[% pkg_namespace %]Init(const char *host, const char *user, const char *passwd, const char *dbname) 2 2 { 3 3 return psDBInit(host, user, passwd, dbname); -
trunk/glueforge/templates/psdb/init_h.tt
r5907 r5960 5 5 */ 6 6 7 psDB *[% table.namespace %]Init(7 psDB *[% pkg_namespace %]Init( 8 8 const char *host, ///< Database server hostname 9 9 const char *user, ///< Database username -
trunk/glueforge/templates/psdb/pop.tt
r5907 r5960 20 20 21 21 rowSet = psDBSelectRows(dbh, [% table.namespace FILTER upper %]_TABLE_NAME, NULL, 1); 22 if (!rowSet) { 23 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item %s", [% table.namespace FILTER upper %]_INDEX_NAME); 24 psFree(row); 25 return NULL; 26 } 27 22 28 row = psArrayGet(rowSet, 0); 23 29 // FIXME: psArrayGet should increment the ref count -
trunk/glueforge/templates/psdb/popfits.tt
r5907 r5960 3 3 char query[MAX_STRING_LENGTH]; 4 4 5 if (! fooSelectRowsFits(dbh, fits, NULL, limit)) {5 if (![% table.namespace %]SelectRowsFits(dbh, fits, NULL, limit)) { 6 6 psError(PS_ERR_UNKNOWN, true, "database error or table is empty"); 7 7 return false; -
trunk/glueforge/templates/psdb/top_makefile_am.tt
r5907 r5960 11 11 [% IF NOT loop.last -%] 12 12 $(top_builddir)/docs/man/man3/[% table.object_name %].3 \ 13 [% ELSE -%]13 [%- ELSE -%] 14 14 $(top_builddir)/docs/man/man3/[% table.object_name %].3 15 15 [% END -%] 16 16 [% END %] 17 17 18 docs/man/man3/[% pkg_name %].3 18 19 [%- FOREACH table = tables -%] 19 docs/man/man3/[% pkg_name %].3 docs/man/man3/[% table.object_name %].3: 20 docs/man/man3/[% table.object_name %].3 21 [%- IF loop.last %]:[% END -%] 22 [%- END %] 20 23 $(DOXYGEN) 21 [%- END %]22 24 23 25 clean-local:
Note:
See TracChangeset
for help on using the changeset viewer.
