NAMEdb4.7_codegen - generate application code for Berkeley DB
SYNOPSISdb4.7_codegen [-Vv] [-a api] [-i file] [-o prefix]
DESCRIPTIONThe db4.7_codegen utility generates application code to create and configure Berkeley DB database environments and databases based on a simple description language and writes it to one or more output files. The generated code may need modification, in the case of complicated applications, but will usually significantly reduce the time required to create Berkeley DB applications. The options are as follows: -a api Generate code for the specified API (currently, only ''c'' is accepted). -i file Specify an input file; by default, standard input is used. -o prefix Specify an output file prefix; by default, ''application'' is used. -V Write the library version number to standard output and exit. -v Run in verbose mode. The db4.7_codegen utility exits 0 on success, and >0 if an error occurs.
C LANGUAGE SPECIFIC INFORMATIONBy default, when the db4.7_codegen utility generates C-language code, the output file is named ''application.c''. The output filename can be specified with the -o option. At the beginning of the output file is a list of public database environment (DB_ENV) handles and database (DB) handles, as specified by the description language. The database environment handle variables are named ''XXX_dbenv'', where ''XXX'' is the name of the environment in the input specification. For databases associated with a database environment, the database handle variables are named ''XXX_YYY'', where ''XXX'' is the name of the environment, and ''YYY'' is the name of the database. For standalone databases, the database handle variables are named ''XXX'', where ''XXX'' is the name of the database. There are two public functions in the output file: bdb_startup() and bdb_shutdown(). The bdb_startup() function should be called to create and configure the database environments and databases, and the bdb_shutdown() function should be called to gracefully shut down the environments and databases.
SPECIFICATION LANGUAGEThe db4.7_codegen uses a simple description language: +
AUTHORSThorsten Glaser <email@example.com> wrote this manual page for the Debian project (but may be used by others) after the original HTML format documentation Copyright (C) 1996,2008 Oracle. All rights reserved. DB4.7_CODEGEN(1)