URL: http://www.firstbasesoftware.com/man/man3/put_autoindex.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[
Index of Contents] [
FirstBase RDBMS Overview]
fb_put_autoindex(db)
fb_database *db;
fb_set_autoindex(db)
fb_database *db;
These autoindex mechanisms are only needed when an existing record is retrieved (fb_getrec or fb_getxrec), a key field is modified, and then the record is replaced (fb_putrec). When new records are added (fb_addrec) or existing records are deleted (fb_delrec), these autoindex mechanisms are not needed.
Generally, the scenario for use of these autoindex maintenance routines is:
char *key; fb_database *dp; fb_getxrec(key, dp); fb_set_autoindex(dp); ... /* change values in key fields */ ... fb_putrec(dp->rec, dp); fb_put_autoindex(dp);
In this pseudo code, a record is retrieved using fb_getxrec. Then fb_set_autoindex is called to save the field values that are used in the defined autoindexes. After this, the values in the fields can be changed and the record is written to the database using fb_putrec. Finally, fb_put_autoindex is called to synchronize all automatic indexes.