File: classmysqlpp_1_1ResultBase.html

package info (click to toggle)
mysql%2B%2B 3.0.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 10,328 kB
  • ctags: 9,487
  • sloc: cpp: 33,486; sh: 3,091; perl: 809; makefile: 683
file content (181 lines) | stat: -rw-r--r-- 18,170 bytes parent folder | download
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>MySQL++ Reference Manual</title>
	<meta http-equiv="Content-type" content="text/html;charset=iso-8859-1">
	<link href="doxygen.css" rel="stylesheet" type="text/css">
	<link href="refman.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<b>mysqlpp</b>::<a class="el" href="classmysqlpp_1_1ResultBase.html">ResultBase</a></div>
<h1>mysqlpp::ResultBase Class Reference</h1><!-- doxytag: class="mysqlpp::ResultBase" --><!-- doxytag: inherits="mysqlpp::OptionalExceptions" -->Base class for <a class="el" href="classmysqlpp_1_1StoreQueryResult.html">StoreQueryResult</a> and <a class="el" href="classmysqlpp_1_1UseQueryResult.html">UseQueryResult</a>.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="result_8h-source.html">result.h</a>&gt;</code>
<p>
Inheritance diagram for mysqlpp::ResultBase:<p><center><img src="classmysqlpp_1_1ResultBase__inherit__graph.png" border="0" usemap="#mysqlpp_1_1ResultBase__inherit__map" alt="Inheritance graph"></center>
<map name="mysqlpp_1_1ResultBase__inherit__map">
<area href="classmysqlpp_1_1StoreQueryResult.html" shape="rect" coords="5,156,205,180" alt="">
<area href="classmysqlpp_1_1UseQueryResult.html" shape="rect" coords="229,156,419,180" alt="">
<area href="classmysqlpp_1_1OptionalExceptions.html" shape="rect" coords="108,7,321,31" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for mysqlpp::ResultBase:<p><center><img src="classmysqlpp_1_1ResultBase__coll__graph.png" border="0" usemap="#mysqlpp_1_1ResultBase__coll__map" alt="Collaboration graph"></center>
<map name="mysqlpp_1_1ResultBase__coll__map">
<area href="classmysqlpp_1_1OptionalExceptions.html" shape="rect" coords="5,7,219,31" alt="">
<area href="classmysqlpp_1_1DBDriver.html" shape="rect" coords="243,7,389,31" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classmysqlpp_1_1ResultBase-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 Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="792b7694b013dee563349544058bec8f"></a><!-- doxytag: member="mysqlpp::ResultBase::~ResultBase" ref="792b7694b013dee563349544058bec8f" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#792b7694b013dee563349544058bec8f">~ResultBase</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="952749f63082ac42601672f2bc72a413"></a><!-- doxytag: member="mysqlpp::ResultBase::fetch_field" ref="952749f63082ac42601672f2bc72a413" args="() const " -->
const <a class="el" href="classmysqlpp_1_1Field.html">Field</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#952749f63082ac42601672f2bc72a413">fetch_field</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the next field in this result set. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f578643af7eaa6b7e1737baa29def4a2"></a><!-- doxytag: member="mysqlpp::ResultBase::fetch_field" ref="f578643af7eaa6b7e1737baa29def4a2" args="(Fields::size_type i) const " -->
const <a class="el" href="classmysqlpp_1_1Field.html">Field</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#f578643af7eaa6b7e1737baa29def4a2">fetch_field</a> (Fields::size_type i) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the given field in this result set. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4aa339365fdf64a8176f72e44c809215"></a><!-- doxytag: member="mysqlpp::ResultBase::field" ref="4aa339365fdf64a8176f72e44c809215" args="(unsigned int i) const " -->
const <a class="el" href="classmysqlpp_1_1Field.html">Field</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#4aa339365fdf64a8176f72e44c809215">field</a> (unsigned int i) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the underlying <a class="el" href="classmysqlpp_1_1Field.html">Field</a> structure given its index. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ccbb443c021c344615c3aa8088aa1a5a"></a><!-- doxytag: member="mysqlpp::ResultBase::fields" ref="ccbb443c021c344615c3aa8088aa1a5a" args="() const " -->
const Fields &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#ccbb443c021c344615c3aa8088aa1a5a">fields</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the underlying Fields structure. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="301684e7f6e06efb2fe3ddd89b3ac44e"></a><!-- doxytag: member="mysqlpp::ResultBase::field_name" ref="301684e7f6e06efb2fe3ddd89b3ac44e" args="(int i) const " -->
const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#301684e7f6e06efb2fe3ddd89b3ac44e">field_name</a> (int i) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the name of the field at the given index. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6af0ace6eaa98fd0040ff3bb74b6c74f"></a><!-- doxytag: member="mysqlpp::ResultBase::field_names" ref="6af0ace6eaa98fd0040ff3bb74b6c74f" args="() const " -->
const <a class="el" href="classmysqlpp_1_1RefCountedPointer.html">RefCountedPointer</a>&lt; <a class="el" href="classmysqlpp_1_1FieldNames.html">FieldNames</a> &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#6af0ace6eaa98fd0040ff3bb74b6c74f">field_names</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the names of the fields within this result set. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#726cf1f92a52b122d4603af796f90ec7">field_num</a> (const std::string &amp;) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the index of the named field.  <a href="#726cf1f92a52b122d4603af796f90ec7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4a12044424a8b5e87a73a1381fe32f80"></a><!-- doxytag: member="mysqlpp::ResultBase::field_type" ref="4a12044424a8b5e87a73a1381fe32f80" args="(int i) const " -->
const FieldTypes::value_type &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#4a12044424a8b5e87a73a1381fe32f80">field_type</a> (int i) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the type of a particular field within this result set. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="00f78b0daeb4b47e954448e53df3a216"></a><!-- doxytag: member="mysqlpp::ResultBase::field_types" ref="00f78b0daeb4b47e954448e53df3a216" args="() const " -->
const <a class="el" href="classmysqlpp_1_1RefCountedPointer.html">RefCountedPointer</a>&lt; <a class="el" href="classmysqlpp_1_1FieldTypes.html">FieldTypes</a> &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#00f78b0daeb4b47e954448e53df3a216">field_types</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a list of the types of the fields within this result set. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4e8fe6bc8a1c6129af9b244e32422482"></a><!-- doxytag: member="mysqlpp::ResultBase::num_fields" ref="4e8fe6bc8a1c6129af9b244e32422482" args="() const " -->
size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#4e8fe6bc8a1c6129af9b244e32422482">num_fields</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of fields in this result set. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1463ba275c27423198376796e0e70fa2"></a><!-- doxytag: member="mysqlpp::ResultBase::table" ref="1463ba275c27423198376796e0e70fa2" args="() const " -->
const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#1463ba275c27423198376796e0e70fa2">table</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the name of the table the result set comes from. <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="13f306c66abb2a9793b02e5db0105093"></a><!-- doxytag: member="mysqlpp::ResultBase::ResultBase" ref="13f306c66abb2a9793b02e5db0105093" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#13f306c66abb2a9793b02e5db0105093">ResultBase</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create empty object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="de911ef2b108a18ebbcfaf43fdc7e7d8"></a><!-- doxytag: member="mysqlpp::ResultBase::ResultBase" ref="de911ef2b108a18ebbcfaf43fdc7e7d8" args="(MYSQL_RES *result, DBDriver *dbd, bool te=true)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#de911ef2b108a18ebbcfaf43fdc7e7d8">ResultBase</a> (MYSQL_RES *result, <a class="el" href="classmysqlpp_1_1DBDriver.html">DBDriver</a> *dbd, bool te=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create the object, fully initialized. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b1e56ed72be6dc439eab03fccec9ce70"></a><!-- doxytag: member="mysqlpp::ResultBase::ResultBase" ref="b1e56ed72be6dc439eab03fccec9ce70" args="(const ResultBase &amp;other)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#b1e56ed72be6dc439eab03fccec9ce70">ResultBase</a> (const <a class="el" href="classmysqlpp_1_1ResultBase.html">ResultBase</a> &amp;other)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create object as a copy of another <a class="el" href="classmysqlpp_1_1ResultBase.html">ResultBase</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3649538671f94a215c72ad03ff9025aa"></a><!-- doxytag: member="mysqlpp::ResultBase::copy" ref="3649538671f94a215c72ad03ff9025aa" args="(const ResultBase &amp;other)" -->
<a class="el" href="classmysqlpp_1_1ResultBase.html">ResultBase</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#3649538671f94a215c72ad03ff9025aa">copy</a> (const <a class="el" href="classmysqlpp_1_1ResultBase.html">ResultBase</a> &amp;other)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy another <a class="el" href="classmysqlpp_1_1ResultBase.html">ResultBase</a> object's contents into this one. <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c0265838557fd0f63b7abae4927a835f"></a><!-- doxytag: member="mysqlpp::ResultBase::driver_" ref="c0265838557fd0f63b7abae4927a835f" args="" -->
<a class="el" href="classmysqlpp_1_1DBDriver.html">DBDriver</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#c0265838557fd0f63b7abae4927a835f">driver_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Access to DB driver; fully initted if nonzero. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="77840415ae9c611506e39e3f42f6ce1f"></a><!-- doxytag: member="mysqlpp::ResultBase::fields_" ref="77840415ae9c611506e39e3f42f6ce1f" args="" -->
Fields&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#77840415ae9c611506e39e3f42f6ce1f">fields_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">list of fields in result <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a3645ffe00fcd51838317fc40f0194a"></a><!-- doxytag: member="mysqlpp::ResultBase::names_" ref="5a3645ffe00fcd51838317fc40f0194a" args="" -->
<a class="el" href="classmysqlpp_1_1RefCountedPointer.html">RefCountedPointer</a>&lt; <a class="el" href="classmysqlpp_1_1FieldNames.html">FieldNames</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#5a3645ffe00fcd51838317fc40f0194a">names_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">list of field names in result <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="60823bb0a547046e1efc68083802194c"></a><!-- doxytag: member="mysqlpp::ResultBase::types_" ref="60823bb0a547046e1efc68083802194c" args="" -->
<a class="el" href="classmysqlpp_1_1RefCountedPointer.html">RefCountedPointer</a>&lt; <a class="el" href="classmysqlpp_1_1FieldTypes.html">FieldTypes</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#60823bb0a547046e1efc68083802194c">types_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">list of field types in result <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Fields::size_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1ResultBase.html#4e3b9892adbd9ad6d86c80e17af9bc5a">current_field_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default field index used by <a class="el" href="classmysqlpp_1_1ResultBase.html#952749f63082ac42601672f2bc72a413">fetch_field()</a>.  <a href="#4e3b9892adbd9ad6d86c80e17af9bc5a"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Base class for <a class="el" href="classmysqlpp_1_1StoreQueryResult.html">StoreQueryResult</a> and <a class="el" href="classmysqlpp_1_1UseQueryResult.html">UseQueryResult</a>. 
<p>
Not useful directly. Just contains common functionality for its subclasses. 
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="726cf1f92a52b122d4603af796f90ec7"></a><!-- doxytag: member="mysqlpp::ResultBase::field_num" ref="726cf1f92a52b122d4603af796f90ec7" args="(const std::string &amp;) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mysqlpp::ResultBase::field_num           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the index of the named field. 
<p>
This is the inverse of <a class="el" href="classmysqlpp_1_1ResultBase.html#301684e7f6e06efb2fe3ddd89b3ac44e">field_name()</a>. 
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="4e3b9892adbd9ad6d86c80e17af9bc5a"></a><!-- doxytag: member="mysqlpp::ResultBase::current_field_" ref="4e3b9892adbd9ad6d86c80e17af9bc5a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Fields::size_type <a class="el" href="classmysqlpp_1_1ResultBase.html#4e3b9892adbd9ad6d86c80e17af9bc5a">mysqlpp::ResultBase::current_field_</a><code> [mutable, protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Default field index used by <a class="el" href="classmysqlpp_1_1ResultBase.html#952749f63082ac42601672f2bc72a413">fetch_field()</a>. 
<p>
It's mutable because it's just internal housekeeping: it's changed by <a class="el" href="classmysqlpp_1_1ResultBase.html#952749f63082ac42601672f2bc72a413">fetch_field(void)</a>, but it doesn't change the "value" of the result. See mutability justification for UseQueryResult::result_: this field provides functionality we used to get through result_, so it's relevant here, too. 
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="result_8h-source.html">result.h</a><li>result.cpp</ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Feb 29 16:26:47 2008 for MySQL++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>