# 2.11BSD#431 - /usr/ingres/source/access/getequal.c

##### Functions

    getequal          X

       1: # include   "../ingres.h"
       2: # include   "../access.h"
       3:
       4: /* tTf flag 97		TTF */
       5:
       6: /*
       7: getequal - get the first tuple equal to the provided key
       8: DESCRIPTION
       9: GETEQUAL is used to do a keyed retrieval of a single
      10: tuple in cases where the calling program knows the key to
      11: be unique.  SETKEY must be called first to set all desired
      12: domain values.  GETEQUAL will return the first tuple with
      13: equality on all of the specified domains.
      14: The tuple is returned in TUPLE.
      15:
      16: 	function values:
      17:
      18: 		<0 fatal error
      19: 		 0  success
      20: 		 1  no match
      21:  */
      22:
      23:
      24: getequal(d1, key, tuple, tid)
      25: struct descriptor   *d1;
      26: char            key[MAXTUP];
      27: char            tuple[MAXTUP];
      28: struct tup_id       *tid;
      29: {
      30:     struct tup_id           limtid;
      31:     register struct descriptor  *d;
      32:     register int            i;
      33:
      34:     d = d1;
      35:
      36: #	ifdef xATR1
      37:     if (tTf(97, 0))
      38:     {
      39:         printf("getequal: %.14s,", d->relid);
      40:         printup(d, key);
      41:     }
      42: #	endif
      43:     if (i = find(d, EXACTKEY, tid, &limtid, key))
      44:         return (i);
      45:     while ((i = get(d, tid, &limtid, tuple, TRUE)) == 0)
      46:     {
      47:         if (!kcompare(d, key, tuple))
      48:         {
      49: #			ifdef xATR2
      50:             if (tTf(97, 1))
      51:             {
      52:                 printf("getequal: ");
      53:                 dumptid(tid);
      54:                 printf("getequal: ");
      55:                 printup(d, tuple);
      56:             }
      57: #			endif
      58:             return (0);
      59:         }
      60:     }
      61: #	ifdef xATR2
      62:     if (tTf(97, 2))
      63:         printf("getequal: %d\n", i);
      64: #	endif
      65:     return (i);
      66: }

#### Defined functions

getequal defined in line 24; used 38 times

- in /usr/ingres/source/access/openr.c line 194-198(2)
- in /usr/ingres/source/dbu/destroy.c line 89
- in /usr/ingres/source/dbu/get_p_tid.c line 59
- in /usr/ingres/source/dbu/help.c line 322
- in /usr/ingres/source/dbu/index.c line 101, 203
- in /usr/ingres/source/dbu/modify.c line 341, 969
- in /usr/ingres/source/dbu/modupdate.c line 144, 159
- in /usr/ingres/source/dbu/pr_tree.c line 242
- in /usr/ingres/source/dbu/readtree.c line 307
- in /usr/ingres/source/dbu/rmqm.c line 537, 678, 736
- in /usr/ingres/source/dbu/save.c line 125
- in /usr/ingres/source/dbu/secupdate.c line 123, 137
- in /usr/ingres/source/dbu/userdestroy.c line 58, 71-76(2)
- in /usr/ingres/source/ovqp/scan.c line 195
- in /usr/ingres/source/parser/attfcn.c line 72
- in /usr/ingres/source/qrymod/d_integ.c line 183
- in /usr/ingres/source/qrymod/d_prot.c line 239, 273
- in /usr/ingres/source/qrymod/define.c line 231
- in /usr/ingres/source/qrymod/readtree.c line 328
- in /usr/ingres/source/support/creatdb.c line 1635
- in /usr/ingres/source/support/purge.c line 204
- in /usr/ingres/source/support/restore.c line 343, 572, 616, 634, 842, 940, 1027

Last modified: 1980-12-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 515 |