Debian Codegraph @

docs/api_reference/CXX/dbccmp.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>Dbc::cmp()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
10 <link rel="up" href="dbc.html" title="Chapter 3.  The Dbc Handle" />
11 <link rel="prev" href="dbcclose.html" title="Dbc::close()" />
12 <link rel="next" href="dbccount.html" title="Dbc::count()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">Dbc::cmp()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="dbcclose.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 3. 
26 The Dbc Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="dbccount.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="dbccmp"></a>Dbc::cmp()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 Dbc::cmp(Dbc *other_cursor, int *result, u_int32_t flags);</pre>
45 <p>
46 The <code class="methodname">Dbc::cmp()</code> method compares two cursors for equality. Two cursors are equal if and only if they are positioned on the same item in the same database.
47 </p>
48 <p>
49 The <code class="methodname">Dbc::cmp()</code> <span>
50
51 <span>
52 method either returns a non-zero error value or throws an
53 exception that encapsulates a non-zero error value on
54 failure, and returns 0 on success.
55 </span>
56 </span>
57 </p>
58 <div class="sect2" lang="en" xml:lang="en">
59 <div class="titlepage">
60 <div>
61 <div>
62 <h3 class="title"><a id="idp6127824"></a>Parameters</h3>
63 </div>
64 </div>
65 </div>
66 <div class="sect3" lang="en" xml:lang="en">
67 <div class="titlepage">
68 <div>
69 <div>
70 <h4 class="title"><a id="idp6128208"></a>other_cursor</h4>
71 </div>
72 </div>
73 </div>
74 <p>
75 The <span class="bold"><strong>other_cursor</strong></span> parameter references
76 another cursor handle that will be used as the comparator.
77 </p>
78 </div>
79 <div class="sect3" lang="en" xml:lang="en">
80 <div class="titlepage">
81 <div>
82 <div>
83 <h4 class="title"><a id="idp6121824"></a>result</h4>
84 </div>
85 </div>
86 </div>
87 <p>
88 If the call is successful and both cursors are positioned on the same item, result is set to zero. If the call is successful but the cursors are not positioned on the same item, result is set to a non-zero value. If the call is unsuccessful, the value of result should be ignored.
89 </p>
90 </div>
91 <div class="sect3" lang="en" xml:lang="en">
92 <div class="titlepage">
93 <div>
94 <div>
95 <h4 class="title"><a id="idp6089792"></a>flags</h4>
96 </div>
97 </div>
98 </div>
99 <p>
100 The <span class="bold"><strong>flags</strong></span> parameter is currently
101 unused, and must be set to 0.
102 </p>
103 </div>
104 </div>
105 <div class="sect2" lang="en" xml:lang="en">
106 <div class="titlepage">
107 <div>
108 <div>
109 <h3 class="title"><a id="idp6088128"></a>Errors</h3>
110 </div>
111 </div>
112 </div>
113 <p>
114 The <code class="methodname">Dbc::cmp()</code> <span>
115
116 <span>
117 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
118 exception, encapsulating one of the following non-zero errors, or return one
119 of the following non-zero errors:
120 </span>
121 </span>
122 </p>
123 <div class="sect3" lang="en" xml:lang="en">
124 <div class="titlepage">
125 <div>
126 <div>
127 <h4 class="title"><a id="idp6135904"></a>EINVAL</h4>
128 </div>
129 </div>
130 </div>
131 <p>
132 </p>
133 <div class="itemizedlist">
134 <ul type="disc">
135 <li>
136 <p>
137 If either of the cursors are already closed.
138 </p>
139 </li>
140 <li>
141 <p>
142 If the cursors have been opened against different databases.
143 </p>
144 </li>
145 <li>
146 <p>
147 If either of the cursors have not been positioned.
148 </p>
149 </li>
150 <li>
151 <p>
152 If the other_dbc parameter is NULL.
153 </p>
154 </li>
155 <li>
156 <p>
157 If the result parameter is NULL.
158 </p>
159 </li>
160 </ul>
161 </div>
162 <p>
163 </p>
164 </div>
165 </div>
166 <div class="sect2" lang="en" xml:lang="en">
167 <div class="titlepage">
168 <div>
169 <div>
170 <h3 class="title"><a id="idp6140952"></a>Class</h3>
171 </div>
172 </div>
173 </div>
174 <p>
175 <a class="link" href="dbc.html" title="Chapter 3.  The Dbc Handle">Dbc</a>
176 </p>
177 </div>
178 <div class="sect2" lang="en" xml:lang="en">
179 <div class="titlepage">
180 <div>
181 <div>
182 <h3 class="title"><a id="idp6118336"></a>See Also</h3>
183 </div>
184 </div>
185 </div>
186 <p>
187 <a class="xref" href="dbc.html#dbclist" title="Database Cursors and Related Methods">Database Cursors and Related Methods</a>
188 </p>
189 </div>
190 </div>
191 <div class="navfooter">
192 <hr />
193 <table width="100%" summary="Navigation footer">
194 <tr>
195 <td width="40%" align="left"><a accesskey="p" href="dbcclose.html">Prev</a> </td>
196 <td width="20%" align="center">
197 <a accesskey="u" href="dbc.html">Up</a>
198 </td>
199 <td width="40%" align="right"> <a accesskey="n" href="dbccount.html">Next</a></td>
200 </tr>
201 <tr>
202 <td width="40%" align="left" valign="top">Dbc::close() </td>
203 <td width="20%" align="center">
204 <a accesskey="h" href="index.html">Home</a>
205 </td>
206 <td width="40%" align="right" valign="top"> Dbc::count()</td>
207 </tr>
208 </table>
209 </div>
210 </body>
211 </html>