00001 /*- 00002 * See the file LICENSE for redistribution information. 00003 * 00004 * Copyright (c) 1998, 1999, 2000 00005 * Sleepycat Software. All rights reserved. 00006 * 00007 * @(#)db_join.h 11.1 (Sleepycat) 7/25/99 00008 */ 00009 00010 #ifndef _DB_JOIN_H 00011 #define _DB_JOIN_H 00012 00013 /* 00014 * Joins use a join cursor that is similar to a regular DB cursor except 00015 * that it only supports c_get and c_close functionality. Also, it does 00016 * not support the full range of flags for get. 00017 */ 00018 typedef struct __join_cursor { 00019 u_int8_t *j_exhausted; /* Array of flags; is cursor i exhausted? */ 00020 DBC **j_curslist; /* Array of cursors in the join: constant. */ 00021 DBC **j_fdupcurs; /* Cursors w/ first intances of current dup. */ 00022 DBC **j_workcurs; /* Scratch cursor copies to muck with. */ 00023 DB *j_primary; /* Primary dbp. */ 00024 DBT j_key; /* Used to do lookups. */ 00025 u_int32_t j_ncurs; /* How many cursors do we have? */ 00026 #define JOIN_RETRY 0x01 /* Error on primary get; re-return same key. */ 00027 u_int32_t flags; 00028 } JOIN_CURSOR; 00029 00030 #endif