Annotation of 43BSD/ingres/doc/access/find.nr, revision 1.1.1.1

1.1       root        1: .th FIND AM 9/6/77
                      2: .sh NAME
                      3: find - set start and end points for a relation scan
                      4: .sh SYNOPSIS
                      5: .nf
                      6: find(d, mode, lotid, hitid, key)
                      7: struct descriptor      *d;
                      8: int                    mode;
                      9: struct tup_id          *lotid, *hitid;
                     10: char                   key[MAXTUP];
                     11: .fi
                     12: .sh DESCRIPTION
                     13: FIND is used to determine start and end points for a scan
                     14: of a relation.
                     15: MODE must be equal to one of the constants
                     16: NOKEY, EXACTKEY, LRANGEKEY, HRANGEKEY or FULLKEY
                     17: which are defined in the "ingres.h" header file.
                     18: LOTID and HITID will be set to the lower and upper
                     19: page limits of the scan, respectively.
                     20: .sp
                     21: If the entire relation is to be scanned,
                     22: FIND should be called with MODE = NOKEY.
                     23: In this case KEY may be omitted and LOTID and HITID
                     24: are set to the absolute lower and upper limits
                     25: of the relation.
                     26: .sp
                     27: There are two ways to restrict the number of pages
                     28: to be scanned.
                     29: One can look for specific values in certain domains,
                     30: or for a range of values in the domains.
                     31: In either case,
                     32: the search values should be placed in KEY using the
                     33: CLEARKEYS and SETKEY functions.
                     34: If one is looking for specific values,
                     35: then FIND should be called with MODE = EXACTKEY.
                     36: LOTID and HITID will both be set for the proper
                     37: scan limits.
                     38: If a range of values is desired, then FIND must be called
                     39: twice.
                     40: The first time with MODE = LRANGEKEY and KEY containing
                     41: the low values for the range.
                     42: This will set LOTID to the proper limit.
                     43: The second time with MODE = HRANGEKEY and KEY containing
                     44: the high values for the range.
                     45: This will set HITID to the proper limit.
                     46: It is not necessary to provide values for the same domains
                     47: on both calls to FIND,
                     48: but care must be taken to use the CLEARKEYS and SETKEY functions properly.
                     49: .sp
                     50: FIND is called with MODE = FULLKEY by FINDBEST and REPLACE.
                     51: This is the same as the EXACTKEY mode except that SETKEY does not
                     52: have to be called and values must be provided for every
                     53: domain of the tuple.
                     54: .sp
                     55: FIND can only reduce the number of tuples that one must check
                     56: against a given qualification.
                     57: FIND cannot gaurantee that the scan is limited to only
                     58: those tuples that meet the restrictions given in KEY.
                     59: .sh DIAGNOSTICS
                     60: .nf
                     61: AMFIND_ERR -- unidentifiable relation storage structure
                     62: AMWRITE_ERR -- pageflush failure
                     63: AMREAD_ERR -- get_page failure
                     64: 0 -- success
                     65: .fi
                     66: .sh "TRACE FLAGS"
                     67: 22.0 - 22.8
                     68: .sh "SEE ALSO"
                     69: clearkeys, findbest, fullkey, get, ndxsearch, replace, rhash, setkey

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.