! "@(#)join.so 10.9 (Sleepycat) 10/27/98"> <!Copyright 1997, 1998 by Sleepycat Software, Inc. All rights reserved.> ee,hash,hashing,transaction,transactions,locking,logging,access method,access me thods,java,C,C++">
public Dbc join(Dbc curslist, int flags) throws DbException;
The Db.join method creates a specialized cursor for use in performing joins on secondary indices. Your data must be organized in the following manner in order to take advantage of this:
These duplicate entries should be sorted. For more information see the Db.DB_DUPSORT flag to the DbInfo.set_flags method.
The primary argument contains the Db handle of the primary database, which is keyed by the data values found in entries in the curslist.
The curslist argument contains a null terminated array of Dbc objects. Each Dbc must have been initialized to reference the key on which the underlying database should be joined. Typically, this initialization is done by a Dbc.get call with the Db.DB_SET flag specified.
The flags parameter is currently unused, and must be set to 0.
The returned cursor has the standard cursor functions, that behave as follows:
The flags parameter must be set to 0 or the following value:
In addition, the following value may be set by logically OR'ing it into the flags parameter:
In a transaction protected environment, all of the cursors listed in curslist must have been created within the same transaction.
The Db.join method throws an exception that encapsulates an errno on failure.
The Db.join method may fail and throw an exception for any of the errors specified for the following Berkeley DB and C library functions: fflush(3), fprintf(3), free(3), malloc(3), memset(3), vfprintf(3), and vsnprintf(3).
In addition, the Db.join method may fail and throw an exception encapsulating errno for the following conditions:
The c_put or c_del functions were called.