~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to db/docs/api_java/dbc_del.html

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--$Id: dbc_del.so,v 10.26 2001/07/09 14:20:16 bostic Exp $-->
 
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
 
3
<!--All rights reserved.-->
 
4
<html>
 
5
<head>
 
6
<title>Berkeley DB: Dbc.del</title>
 
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
 
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
 
9
</head>
 
10
<body bgcolor=white>
 
11
<a name="2"><!--meow--></a>
 
12
<table width="100%"><tr valign=top>
 
13
<td>
 
14
<h1>Dbc.del</h1>
 
15
</td>
 
16
<td align=right>
 
17
<a href="../api_java/java_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
18
</td></tr></table>
 
19
<hr size=1 noshade>
 
20
<tt>
 
21
<h3><pre>
 
22
import com.sleepycat.db.*;
 
23
<p>
 
24
public int del(int flags)
 
25
        throws DbException;
 
26
</pre></h3>
 
27
<h1>Description</h1>
 
28
<p>The Dbc.del method deletes the key/data pair to which the cursor
 
29
refers.
 
30
<p>When called on a cursor opened on a database that has been made into a
 
31
secondary index using the <a href="../api_java/db_associate.html">Db.associate</a> method, the <a href="../api_java/db_del.html">Db.del</a> method
 
32
deletes the key/data pair from the primary database and all secondary
 
33
indices.
 
34
<p>The <b>flags</b> parameter is currently unused, and must be set to 0.
 
35
<p>The cursor position is unchanged after a delete, and subsequent calls to
 
36
cursor functions expecting the cursor to refer to an existing key will
 
37
fail.
 
38
<p>If the element has already been deleted, Dbc.del will return
 
39
<a href="../ref/program/errorret.html#DB_KEYEMPTY">Db.DB_KEYEMPTY</a>.
 
40
<p>If the cursor is not yet initialized, the Dbc.del method throws an exception that encapsulates EINVAL.
 
41
<p>Otherwise, the Dbc.del method throws an exception that encapsulates a non-zero error value on
 
42
failure.
 
43
<h1>Errors</h1>
 
44
<p>The Dbc.del method may fail and throw an exception encapsulating a non-zero error for the following conditions:
 
45
<p><dl compact>
 
46
<p><dt>Db.DB_SECONDARY_BAD<dd>A secondary index references a nonexistent primary key.
 
47
</dl>
 
48
<p><dl compact>
 
49
<p><dt>EACCES<dd>An attempt was made to modify a read-only database.
 
50
</dl>
 
51
<p><dl compact>
 
52
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
 
53
</dl>
 
54
<p><dl compact>
 
55
<p><dt>EPERM  <dd>Write attempted on read-only cursor when the <a href="../api_java/env_open.html#DB_INIT_CDB">Db.DB_INIT_CDB</a> flag was
 
56
specified to <a href="../api_java/env_open.html">DbEnv.open</a>.
 
57
</dl>
 
58
<p>If the operation was selected to resolve a deadlock, the
 
59
Dbc.del method will fail and
 
60
throw a <a href="../api_java/deadlock_class.html">DbDeadlockException</a> exception.
 
61
<p>The Dbc.del method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods.
 
62
If a catastrophic error has occurred, the Dbc.del method may fail and throw
 
63
a <a href="../api_java/runrec_class.html">DbRunRecoveryException</a>, in which case all subsequent Berkeley DB calls
 
64
will fail in the same way.
 
65
<h1>Class</h1>
 
66
<a href="../api_java/dbc_class.html">Dbc</a>
 
67
<h1>See Also</h1>
 
68
<a href="../api_java/dbc_close.html">Dbc.close</a>,
 
69
<a href="../api_java/dbc_count.html">Dbc.count</a>,
 
70
<a href="../api_java/dbc_del.html">Dbc.del</a>,
 
71
<a href="../api_java/dbc_dup.html">Dbc.dup</a>,
 
72
<a href="../api_java/dbc_get.html">Dbc.get</a>,
 
73
<a href="../api_java/dbc_get.html">Dbc.pget</a>,
 
74
and
 
75
<a href="../api_java/dbc_put.html">Dbc.put</a>.
 
76
</tt>
 
77
<table width="100%"><tr><td><br></td><td align=right>
 
78
<a href="../api_java/java_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
79
</td></tr></table>
 
80
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
 
81
</body>
 
82
</html>