Database Single User High Level API

The single user database API module has the file name dblocal.c. This module provides a programmer with a high level callable API that will access the Bbuuzzb database engine. This API is available for all platforms and is part of single user database access as well as the database server. Almost all functions require a tid as the first function parameter. Any mention of QNX in this document refers to the QNX 4.x OS.

Here is a list of functions in this module:

- db_initialize
- db_open
- db_close
- db_next
- db_top
- db_get_rec
- db_get_rec_size
- db_get_field_size
- db_get_field
- db_goto
- db_count
- db_put_field
- db_write
- db_delete
- db_get_delete_flag
- db_set_delete_flag
- db_pack
- db_find
- db_find_field
- db_find_part
- db_find_field_part
- db_get_nfields
- db_get_rec_num
- db_get_pos
- db_set_pos
- db_get_change_rec_flag
- db_set_change_rec_flag
- db_get_enf_change_rec_flag
- db_set_enf_change_rec_flag
- db_get_autopack
- db_set_autopack
- db_get_rec_count
- db_new
- db_get_is_table_locked
- db_set_is_table_locked
- db_new_table
- db_get_open_table_list
- db_get_nsubfields
- db_get_subfield_size
- db_get_subfield
- db_put_subfield
- db_get_nsubsubfields
- db_get_subsubfield_size
- db_get_subsubfield
- db_put_subsubfield
- db_delete_table
- db_exist
- db_clear_table
- db_copy_table
- db_sort
- db_get_sort_max_mem
- db_get_sort_max_open_bin
- db_set_sort_max_mem
- db_set_sort_max_open_bin
- db_delete_field
- db_delete_subfield
- db_delete_subsubfield
- db_get_catalog_list
- db_end
- db_atid_lookup

# Module Dependencies

This module is part of the database single user API and needs to be linked with the following modules:

- fio.c
- parse.c
- logger.c
- ipcomm.c (database server and single user if using system logger, all platforms except QNX and DOS)
- sys_log.c (database server and single user if using system logger, all platforms except DOS)
- slogcode.c (database server and single user if using system logger, all platforms except DOS)
- sloc.c (database server and single user if using system logger, all platforms except QNX and DOS)
- slconfig.c (database server and single user if using system logger, all platforms except QNX and DOS)
- sliocode.c (database server and single user if using system logger, all platforms except QNX and DOS)
- sconnect.c (database server and single user if using system logger, all platforms except QNX and DOS)
- dbengses.c (database server only)
- dbengrep.c (database server only)
- dbiocode.c
- dbeng.c
- dbengcfg.c
- dblocfg.c
- dbengsrt.c
- dbengcat.c

In the Linux/Unix/QNX platforms, this module is compiled along with the other database modules as part of the script cdbeng. A good example of a shell script that uses this API is mkdb.

# Module Header Files

This module depends on the following header files:

- stdhead.h
- dbeng.h
- dbiocode.h
- dblocal.h
- dbengsrt.h

# Functions Unique to the Single User Database API

The following functions are unique to this module and are not present in the client/server database API.

## db_atid_lookup

    Prototype   :  struct dbeng_table *db_atid_lookup(int tid)

          Name  : tid
    Description : tid

    Returns     : dbeng_table pointer

This function takes a tid and performs a lookup and returns the corresponding dbeng_table pointer. This function is used internally by this API and should not be called by applications.

Goto Top | Future Lab Home | Contact Webmaster | Feedback

Copyright © 1999-2006 Future Lab, Last Updated Jun 30, 2006