~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/docs/api_tcl/db_get.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--$Id$-->
3
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
4
 
<!--All rights reserved.-->
5
 
<!--See the file LICENSE for redistribution information.-->
6
 
<html>
7
 
<head>
8
 
<title>Berkeley DB: db get</title>
9
 
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
10
 
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
 
</head>
12
 
<body bgcolor=white>
13
 
<a name="2"><!--meow--></a>
14
 
<table width="100%"><tr valign=top>
15
 
<td>
16
 
<h1><i>db</i> <b>get</b></h1>
17
 
</td>
18
 
<td align=right>
19
 
<a href="../api_tcl/tcl_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
20
 
</td></tr></table>
21
 
<hr size=1 noshade>
22
 
<tt>
23
 
<h3><pre>db get
24
 
        [-consume]
25
 
        [-consume_wait]
26
 
        [-glob]
27
 
        [-partial {doff dlen}]
28
 
        [-recno]
29
 
        [-rmw]
30
 
        [-txn txnid]
31
 
        key
32
 
db get
33
 
        -get_both
34
 
        [-partial {doff dlen}]
35
 
        [-rmw]
36
 
        [-txn txnid]
37
 
        key data
38
 
</pre></h3>
39
 
<h1>Description</h1>
40
 
<p>The <i>db</i> <b>get</b> command returns key/data pairs from the database.
41
 
<p>In the presence of duplicate key values, <i>db</i> <b>get</b> will return all
42
 
duplicate items.  Duplicates are sorted by insert order except where this
43
 
order has been overridden by cursor operations.
44
 
<p>The options are as follows:
45
 
<p><dl compact>
46
 
<p><dt>-consume<dd>Return the record number and data from the available record closest to
47
 
the head of the queue, and delete the record. The cursor will be
48
 
positioned on the deleted record.  A record is available if it is not
49
 
deleted and is not currently locked.  The underlying database must be
50
 
of type Queue for <b>-consume</b> to be specified.
51
 
<p><dt>-consume_wait<dd>The same as the <b>-consume</b> flag except that if the Queue database
52
 
is empty, the thread of control will wait until there is data in the
53
 
queue before returning.  The underlying database must be of type Queue
54
 
for <b>-consume_wait</b> to be specified.
55
 
<p><dt>-get_both key data<dd>Retrieve the key/data pair only if both the key and data match the
56
 
arguments.
57
 
<p><dt>-glob<dd>Return all keys matching the given key, where the key is a simple
58
 
wildcard pattern.  Where it is used, it replaces the use of the key with
59
 
the given pattern of a set of keys.  Any characters after the wildcard
60
 
character are ignored.  For example, in a database of last names, the
61
 
command "db0 get Jones" will return all occurrences of "Jones" in the
62
 
database, and the command "db0 get -glob Jo*" will return both "Jones"
63
 
and "Johnson" from the database.  The command "db0 get -glob *" will
64
 
return all of the key/data pairs in the database.
65
 
This option only works on databases using the Btree access method.
66
 
<p><dt>-partial {doff dlen}<dd>The <b>dlen</b> bytes starting <b>doff</b> bytes from the beginning
67
 
of the retrieved data record are returned as if they comprised the
68
 
entire record. If any or all of the specified bytes do not exist in the
69
 
record, the command is successful and any existing bytes are returned.
70
 
<p><dt>-recno<dd>Retrieve the specified numbered key/data pair from a database.  For
71
 
<b>-recno</b> to be specified, the specified key must be a record
72
 
number; and the underlying database must be of type Recno or Queue, or
73
 
of type Btree that was created with the <b>-recnum</b> option.
74
 
<p><dt>-rmw<dd>Acquire write locks instead of read locks when doing the retrieval.
75
 
Setting this flag may decrease the likelihood of deadlock during a
76
 
read-modify-write cycle by immediately acquiring the write lock during
77
 
the read part of the cycle so that another thread of control acquiring a
78
 
read lock for the same item, in its own read-modify-write cycle, will not
79
 
result in deadlock.
80
 
<p>Because the <i>db</i> <b>get</b> command will not hold locks across Berkeley DB
81
 
interface calls in nontransactional environments, the <b>-rmw</b>
82
 
argument to the <i>db</i> <b>get</b> call is only meaningful in the presence
83
 
of transactions.
84
 
<p><dt>-txn txnid<dd>If the operation is to be
85
 
transaction-protected,
86
 
the <b>txnid</b> parameter is a transaction handle returned from
87
 
<i>env</i> <b>txn</b>.
88
 
</dl>
89
 
<p>If the underlying database is a Queue or Recno database, the given key
90
 
will be interpreted by Tcl as an integer.  For all other database types,
91
 
the key is interpreted by Tcl as a byte array, unless indicated by a
92
 
given option.
93
 
<p>A list of key/data pairs is returned.  In the error case that no matching
94
 
key exists, an empty list is returned.  In all other cases, a Tcl error
95
 
is thrown.
96
 
</tt>
97
 
<table width="100%"><tr><td><br></td><td align=right>
98
 
<a href="../api_tcl/tcl_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
99
 
</td></tr></table>
100
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
101
 
</body>
102
 
</html>