File: get.html

package info (click to toggle)
db 2%3A2.4.14-2.7.7.1.c
  • links: PTS
  • area: main
  • in suites: potato
  • size: 12,716 kB
  • ctags: 9,382
  • sloc: ansic: 35,556; tcl: 8,564; cpp: 4,890; sh: 2,075; makefile: 1,723; java: 1,632; sed: 419; awk: 153; asm: 41
file content (41 lines) | stat: -rw-r--r-- 1,939 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<! "@(#)get.so	10.3 (Sleepycat) 10/19/98">
<!Copyright 1997, 1998 by Sleepycat Software, Inc.  All rights reserved.>
<html>
<body bgcolor=white>
<head>
<title>Berkeley DB Reference Guide: Access Methods</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btr
ee,hash,hashing,transaction,transactions,locking,logging,access method,access me
thods,java,C,C++">
</head>
<h3>Berkeley DB Reference Guide: Access Methods</h3>
<p>
<h1 align=center>Retrieving records</h1>
<p>
The <a href="../../api_c/Db/get.html">DB->get</a> function is the standard function for retrieving
records from the database.  In general, the get function takes a key
and returns the associated data from the database.
<p>
There are a few flags that you can set to customize retrieval:
<dl compact>
<p><dt><a href="../../api_c/Db/get.html#DB_GET_BOTH">DB_GET_BOTH</a><dd>Search for a matching key and data item, i.e., only return if both
the key and the data items match those stored in the database.
<p><dt><a href="../../api_c/Dbc/get.html#DB_RMW">DB_RMW</a><dd>Acquire write locks instead of read locks during retrieval.  This
can enhance performance in threaded applications where deadlock is
a concern.
<p><dt><a href="../../api_c/Db/get.html#DB_SET_RECNO">DB_SET_RECNO</a><dd>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.
</dl>
<p>
If the database has been configured to support duplicate records,
<a href="../../api_c/Db/get.html">DB->get</a> will always return the first data item in the duplicate
set.
<p>
<a href="../../ref/am/ops.html"><img src="../../images/prev.gif"></a>
<a href="../../ref/toc.html"><img src="../../images/toc.gif"></a>
<a href="../../ref/am/put.html"><img src="../../images/next.gif"></a>
</tt>
</body>
</html>