• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..09-Sep-2013-

READMEH A D09-Sep-2013988 2316

sample.sqlH A D09-Sep-2013661 1914

README

1This directory contains a sql source file called sample.sql.  To use
2db_sql to translate this schema into C code implementing a Berkeley DB
3storage layer, issue the following command:
4
5  db_sql -i sample.sql -t sample_test.c
6
7This will produce three files: sample.h, sample.c, and sample_test.c.
8
9The generated program includes, in sample_test.c, a main function to
10exercise the new storage layer.  To build the program, compile the two
11.c source files and link them together with the Berkeley DB runtime
12library.  On Unix, this command would typically be somethin like:
13
14cc -g -I$BDB_INSTALL/include -L$BDB_INSTALL/lib -o sample sample.c sample_test.c -ldb-4.8 -lpthread
15
16On Windows, you could use Visual Studio to create a project containing
17these files.
18
19Once the program is built, you can run it with no arguments.  The
20program generated from sample.sql will create a database environment
21in a directory named "numismatics."  This directory must be created
22before the program is run.
23