# DBT: Bulk Retrieval |

`

If either of the DB_MULTIPLE or DB_MULTIPLE_KEY flags were specified to the DB->get or DBcursor->c_get methods, the data DBT returned by those interfaces will refer to a buffer that is filled with data. Access to that data is through the following macros:

DB_MULTIPLE_INIT

      DB_MULTIPLE_INIT(void *pointer, DBT *data);

  Initialize the retrieval. The pointer argument is a variable to be initialized. The data argument is a DBT structure returned from a successful call to DB->get or DBcursor->c_get for which one of the DB_MULTIPLE or DB_MULTIPLE_KEY flags was specified.

DB_MULTIPLE_NEXT

      DB_MULTIPLE_NEXT(void *pointer, DBT *data, void *retdata, size_t retdlen);

  The data argument is a DBT structure returned from a successful call to DB->get or DBcursor->c_get for which the DB_MULTIPLE flag was specified. The pointer and data arguments must have been previously initialized by a call to DB_MULTIPLE_INIT. The retdata argument is set to refer to the next data element in the returned set, and the retdlen argument is set to the length, in bytes, of that data element. When used with the Queue and Recno access methods, retdata will be set to NULL for deleted records. The pointer argument is set to NULL if there are no more data elements in the returned set.

DB_MULTIPLE_KEY_NEXT

      DB_MULTIPLE_KEY_NEXT(void *pointer, DBT *data,
      	void *retkey, size_t retklen, void *retdata, size_t retdlen);

  The data argument is a DBT structure returned from a successful call to DB->get or DBcursor->c_get for which the DB_MULTIPLE_KEY flag was specified. The pointer and data arguments must have been previously initialized by a call to DB_MULTIPLE_INIT. The retkey argument is set to refer to the next key element in the returned set, and the retklen argument is set to the length, in bytes, of that key element. The retdata argument is set to refer to the next data element in the returned set, and the retdlen argument is set to the length, in bytes, of that data element. The pointer argument is set to NULL if there are no more key/data pairs in the returned set.

DB_MULTIPLE_RECNO_NEXT

      DB_MULTIPLE_RECNO_NEXT(void *pointer, DBT *data,
      	db_recno_t recno, void * retdata, size_t retdlen);

  The data argument is a DBT structure returned from a successful call to DB->get or DBcursor->c_get for which the DB_MULTIPLE_KEY flag was specified. The pointer and data arguments must have been previously initialized by a call to DB_MULTIPLE_INIT. The recno argument is set to the record number of the next record in the returned set. The retdata argument is set to refer to the next data element in the returned set, and the retdlen argument is set to the length, in bytes, of that data element. When used with the Queue and Recno access methods, retdata will be set to NULL for deleted records. The pointer argument is set to NULL if there are no more key/data pairs in the returned set.

`

Copyright Sleepycat Software