📄 classdbcursor.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title> TemplatedbCursor< T > class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center>
<hr><h1>dbCursor< T > Class Template Reference</h1><code>#include <<a class="el" href="cursor_8h-source.html">cursor.h</a>></code>
<p>
<p>Inheritance diagram for dbCursor< T >:
<p><center><img src="classdbCursor.png" usemap="#dbCursor< T >_map" border="0" alt=""></center>
<map name="dbCursor< T >_map">
<area href="classdbAnyCursor.html" alt="dbAnyCursor" shape="rect" coords="0,56,96,80">
<area href="classdbL2List.html" alt="dbL2List" shape="rect" coords="0,0,96,24">
</map>
<a href="classdbCursor-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora0">dbCursor</a> (dbCursorType type=dbCursorViewOnly)</td></tr>
<tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora1">dbCursor</a> (<a class="el" href="classdbDatabase.html">dbDatabase</a> *aDb, dbCursorType type=dbCursorViewOnly)</td></tr>
<tr><td nowrap align=right valign=top>T * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora2">get</a> ()</td></tr>
<tr><td nowrap align=right valign=top>T * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora3">next</a> ()</td></tr>
<tr><td nowrap align=right valign=top>T * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora4">prev</a> ()</td></tr>
<tr><td nowrap align=right valign=top>T * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora5">first</a> ()</td></tr>
<tr><td nowrap align=right valign=top>T * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora6">last</a> ()</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora7">seek</a> (<a class="el" href="classdbReference.html">dbReference</a>< T > const &ref)</td></tr>
<tr><td nowrap align=right valign=top>T * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora8">operator-></a> ()</td></tr>
<tr><td nowrap align=right valign=top>T * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora9">at</a> (<a class="el" href="classdbReference.html">dbReference</a>< T > const &ref)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora10">toArray</a> (<a class="el" href="classdbArray.html">dbArray</a>< <a class="el" href="classdbReference.html">dbReference</a>< T > > &arr) const</td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classdbReference.html">dbReference</a>< T > </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora11">currentId</a> () const</td></tr>
<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursora12">isInSelection</a> (<a class="el" href="classdbReference.html">dbReference</a>< T > &ref)</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a13">getNumberOfRecords</a> () const</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a14">remove</a> ()</td></tr>
<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a15">isEmpty</a> () const</td></tr>
<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a17">isUpdateCursor</a> () const</td></tr>
<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a18">isLimitReached</a> () const</td></tr>
<tr><td nowrap align=right valign=top>oid_t * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a19">toArrayOfOid</a> (oid_t *arr) const</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a20">select</a> (<a class="el" href="classdbQuery.html">dbQuery</a> &query, dbCursorType aType, void *paramStruct=NULL)</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a21">select</a> (<a class="el" href="classdbQuery.html">dbQuery</a> &query, void *paramStruct=NULL)</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a22">select</a> (char const *condition, dbCursorType aType, void *paramStruct=NULL)</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a23">select</a> (char const *condition, void *paramStruct=NULL)</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a24">select</a> (dbCursorType aType)</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a25">select</a> ()</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a26">selectByKey</a> (char const *key, void const *value)</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a27">selectByKeyRange</a> (char const *key, void const *minValue, void const *maxValue)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a28">update</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a29">removeAll</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a30">removeAllSelected</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a31">setSelectionLimit</a> (size_t lim)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a32">unsetSelectionLimit</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a33">setPrefetchMode</a> (bool mode)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a34">enableCheckForDuplicates</a> (bool enabled)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a35">reset</a> ()</td></tr>
<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a36">isLast</a> () const</td></tr>
<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a37">isFirst</a> () const</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a38">freeze</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a39">unfreeze</a> ()</td></tr>
<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a40">skip</a> (int n)</td></tr>
<tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a41">seek</a> (oid_t oid)</td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classdbTableDescriptor.html">dbTableDescriptor</a> * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a42">getTable</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a43">setTable</a> (<a class="el" href="classdbTableDescriptor.html">dbTableDescriptor</a> *aTable)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a44">setRecord</a> (void *rec)</td></tr>
<tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a45">getRecord</a> ()</td></tr>
<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a46">isInSelection</a> (oid_t oid)</td></tr>
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a47">fetch</a> ()</td></tr>
<tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classdbCursor.html#dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a48">hasNext</a> () const</td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="dbCursorn0" doxytag="dbCursor::record"></a>
T </td><td valign=bottom><b>record</b></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template<class T><br>
class dbCursor< T ></h3>
Cursor template parameterized by table class
<p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a name="dbCursora0" doxytag="dbCursor::dbCursor"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> dbCursor< T >::dbCursor </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">dbCursorType </td>
<td class="mdname1" valign="top" nowrap> <em>type</em> = dbCursorViewOnly </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Cursor constructor <dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>type</em> </td><td>
cursor type (dbCursorViewOnly by default) </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="dbCursora1" doxytag="dbCursor::dbCursor"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> dbCursor< T >::dbCursor </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classdbDatabase.html">dbDatabase</a> * </td>
<td class="mdname" nowrap> <em>aDb</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>dbCursorType </td>
<td class="mdname" nowrap> <em>type</em> = dbCursorViewOnly</td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Cursor constructor with explicit specification of database. This cursor should be used for unassigned tables. <dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aDb</em> </td><td>
database in which table lookup is performed </td></tr>
<tr><td valign=top><em>type</em> </td><td>
cursor type (dbCursorViewOnly by default) </td></tr>
</table>
</dl> </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="dbCursora9" doxytag="dbCursor::at"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> T* dbCursor< T >::at </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classdbReference.html">dbReference</a>< T > const & </td>
<td class="mdname1" valign="top" nowrap> <em>ref</em> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Select record by reference <dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ref</em> </td><td>
reference to the record </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
pointer to the referenced record </dl> </td>
</tr>
</table>
<a name="dbCursora11" doxytag="dbCursor::currentId"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classdbReference.html">dbReference</a><T> dbCursor< T >::currentId </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap> const<code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Get current object idenitifer <dl compact><dt><b>Returns: </b></dt><dd>
reference to the current record </dl> </td>
</tr>
</table>
<a name="dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a34" doxytag="dbCursor::enableCheckForDuplicates"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void dbAnyCursor::enableCheckForDuplicates </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname1" valign="top" nowrap> <em>enabled</em> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Enable or disable duplicates checking (if programmer knows that disjuncts in query do not intersect, then he can disable duplicate checking and avoid bitmap allocation </td>
</tr>
</table>
<a name="dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a47" doxytag="dbCursor::fetch"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void dbAnyCursor::fetch </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Fetch current record. You should use this method only if prefetch mode is disabled </td>
</tr>
</table>
<a name="dbCursora5" doxytag="dbCursor::first"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> T* dbCursor< T >::first </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Get pointer to the first record <dl compact><dt><b>Returns: </b></dt><dd>
pointer to the first record or <code>NULL</code> if no records were selected </dl> </td>
</tr>
</table>
<a name="dbCursor_3_01dbTimeSeriesBlock_3_01T_01_4_01_4a38" doxytag="dbCursor::freeze"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void dbAnyCursor::freeze </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [inherited]</code></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -