Berkeley DB Reference Guide:
Access Methods

PrevRefNext

Retrieving records

The DB->get method retrieves records from the database. In general, DB->get takes a key and returns the associated data from the database.

(DB->get´Â µðºñ·ÎºÎÅÍ ·¹Äڵ带 ¸®Æ®¸®ºùÇÑ´Ù.ÀϹÝÀûÀ¸·Î DB->get Àº Å°¸¦ ¹Þ°í °ü·ÃµÈ µ¥ÀÌŸ¸¦ ¸®ÅÏÇÑ´Ù.)

There are a few flags that you can set to customize retrieval:

DB_GET_BOTH
Search for a matching key and data item, that is, only return success if both the key and the data items match those stored in the database.

ÀÏÄ¡ÇÏ´Â Å°¿Í µ¥ÀÌŸÀÌÅÛÀ» ã´Â´Ù.Áï Å°¿Í µ¥ÀÌŸ ÀÌÀÌÅÛÀÌ ÀÏÄ¡ÇÒ¶§¸¸ ¼º°øÀ» ¸®ÅÏÇÑ´Ù.

DB_RMW
Read-modify-write: acquire write locks instead of read locks during retrieval. This can enhance performance in threaded applications by reducing the chance of deadlock.

DB_SET_RECNO
If the underlying database is a Btree, and was configured so that it is possible to search it by logical record number, retrieve a specific record.

If the database has been configured to support duplicate records, DB->get will always return the first data item in the duplicate set.


PrevRefNext

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.