URL: http://www.firstbasesoftware.com/man/man3/getirec.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]


NAME

getirec - read a database record, synchronize with btree index

SYNOPSIS

#include <firstbase/fb.h>

fb_getirec(rec, db)
long rec;
fb_database *db;

DESCRIPTION

As explained in the database(4) manual page, a database structure contains all of the elements needed for an entire database, including an array of field structures, all file names and descriptors, and index information. Altogether, the array of field structures can hold one complete record.

Fb_getirec retrieves logical record rec from the database pointed to by db using getrec(3).

Then, under a certain set of conditions, fb_getirec will synchronize the current record with the current index so that subsequent calls to nextxrec(3) and prevxrec(3) locate the indexed records after and before the database record rec.

The set of conditions where the synchronizing occurs is: (a) the current index is a btree index that is represented in the b_autoindex array; (b) the useidx(3) mechanism was used to activate the current index.

CLIENT/SERVER

The fb_getirec routine will transparently call the fb_getirec_clnt mechanism when the global FirstBase variable cdb_use_rpc is set to one. See fb_clnt_create(3) for more details.

SEE ALSO

fetch(3), putrec(3), getrec(3), getxrec(3), opendb(3), useidx(3), database(4), autoindex(5).

DIAGNOSTICS

Fb_getirec will return the error code FB_ERROR if any of its reads, writes, or seeks fail. On correct reading of the record and synchronization of the index, the status FB_AOK will be returned.


URL: http://www.firstbasesoftware.com/man/man3/getirec.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]