Database Header Files

The following header files are used by the Future Lab database modules:

Dbcomm.h

This header contains defines for the database command codes. These command codes are not used by the database engine but are used by database applications that use command keywords.

Dbcs.h

This header contains function prototypes for the database module dbcs.c.

Dbcscfg.h

This header contains function prototypes for the database module dbcscfg.c.

Dbeng.h

This is the main database engine header. It contains various defines including the maximum record/field size and database delimiters.

Function prototypes for the database module dbeng.c are also contained in this header.

The definition of the table structure dbeng_table is also contained in this header.

dbeng_table Structure

struct dbeng_table
   {
   struct dbeng_table *next;           /* pointer to next table */
   FILE *handle;                       /* file handle */
   char *rec;                          /* current record contents */
   char *name;                         /* file name */
   int tid;                            /* assigned table ID */
   int change_rec_flag;                /* has current record changed? */
   int enforce_change_rec_flag;        /* enforce 'change_rec_flag'? */
   int process_deleted;                /* retreive recs marked for del? */
   int is_table_locked;                /* is the table read/write locked? */
   long record_number;                 /* current record number */
   long record_count;                  /* current record count */
   long orig_position;                 /* original (start) pos of record */
   };

Here is an explaination of each of the dbeng_table structure members:

next

This is a pointer to the next member in the link list. The Bbuuzzb database engine maintains a list of all accessed table using this single link list.

handle

This is the actual file/stream handle used to access the table. In the client/server version and if the session table is active, most of the files will be closed. In the stand-alone version or if the session table is not active, most files will be open.

rec

This is the record buffer. As fields are deleted/added or modified, the contents of this record buffer are changed. This buffer contains the current active record.

name

This member is the actual OS name of the file including a drive designation, path and file name.

tid

This is the table ID assigned when the table was first opened. Each tid is unique even if the engine has the same table opened many times.

change_rec_flag

This member indicates whether the contents of the current record have changed. If the record contents have changed and the enforce_change_rec_flag is also on, all function calls that would empty the record buffer or change the file pointer will not be allowed.

enforce_change_rec_flag

This flag instructs the Bbuuzzb database engine whether to enforce the change_rec_flag.

process_deleted

This structure member instructs the Bbuuzzb database engine whether to include records marked for deletion in record processing like reading records, counting records etc.

is_table_locked

This member indicates whether the table involved is currently locked. Note that this flag is currently not enforced.

record_number

This member represents the sequential record number within the current table. A zero record number usually indicates that there is not current record.

record_count

This member contains the number of records currently in the table.

orig_position

This member contains the file pointer position to the beginning of the current record. A minus one (-1) value indicates the file pointer is at the top of the table and there is no current record.

Dbengcfg.h

This header contains the database engine configuration defaults based on the platform along with the name of the database configuration file and function prototypes for the database module dbengcfg.c.

Dbengver.h

This header contains a single define which is the database engine version.

Dbiocode.h

This header contains function prototypes for the database module dbiocode.c.

Dblocal.h

This header contains function prototypes for the database module dblocal.c.

Dblocfg.h

This header contains function prototypes for the database module dblocfg.c.

Dbmess.h

This header is not tied to any specific database module. It contains defines of:

The definition of the server send structure dbeng_send_message is also in this header.

Goto Top | GPL Library Overview | GPL Library
Future Lab Home | Contact Webmaster | Feedback

Copyright © 1999 Future Lab Inc., Last Updated Jun 8, 1999