URL: http://www.firstbasesoftware.com/man/man3/nextxrec.htm
Last modified: 10 April 1996
Copyright © by FirstBase Software.
[
Index of Contents] [
FirstBase RDBMS Overview]
fb_nextxrec(db)
fb_database *db;
fb_prevxrec(db)
fb_database *db;
Fb_nextxrec attempts to load the next indexed record into database db. If a record has not already been loaded using fb_getxrec(3) or a similar index mechanism, then the initial call (and only the initial call) to fb_nextxrec will load the the first indexed record (ala firstxrec(3)). To repeat a loop through all indexed records, use firstxrec(3) followed by nextxrec, or use the forxeach(3) mechanism.
Fb_prevxrec attempts to load the previous indexed record into database db. If one record has not already been loaded, nothing is done.
Once a record number is retrieved from the index, getrec(3) is used by these routines to actually load the record into the database structures.
When using a FirstBase flat index, the physical position number of the index entry, the index record number, is stored in the database structure db->bsrec. If db->bsrec is greater than db->bsend, the returned record's key is stored in the overflow area of the index, otherwise it is stored in the binary searchable area.
However, when using a FirstBase Btree+ index, the db->bsrec value is actually the record number (not the index record number).