⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resultset_8h-source.html.svn-base

📁 絲路server源碼 Silk Road server source
💻 SVN-BASE
📖 第 1 页 / 共 2 页
字号:
<!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>odbc++/resultset.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.2.13.1 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </center><hr><h1>odbc++/resultset.h</h1><div class="fragment"><pre>00001 <font class="comment">/* </font>00002 <font class="comment">   This file is part of libodbc++.</font>00003 <font class="comment">   </font>00004 <font class="comment">   Copyright (C) 1999-2000 Manush Dodunekov &lt;manush@stendahls.net&gt;</font>00005 <font class="comment">   </font>00006 <font class="comment">   This library is free software; you can redistribute it and/or</font>00007 <font class="comment">   modify it under the terms of the GNU Library General Public</font>00008 <font class="comment">   License as published by the Free Software Foundation; either</font>00009 <font class="comment">   version 2 of the License, or (at your option) any later version.</font>00010 <font class="comment">   </font>00011 <font class="comment">   This library is distributed in the hope that it will be useful,</font>00012 <font class="comment">   but WITHOUT ANY WARRANTY; without even the implied warranty of</font>00013 <font class="comment">   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</font>00014 <font class="comment">   Library General Public License for more details.</font>00015 <font class="comment">   </font>00016 <font class="comment">   You should have received a copy of the GNU Library General Public License</font>00017 <font class="comment">   along with this library; see the file COPYING.  If not, write to</font>00018 <font class="comment">   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,</font>00019 <font class="comment">   Boston, MA 02111-1307, USA.</font>00020 <font class="comment">*/</font>00021 00022 <font class="preprocessor">#ifndef __ODBCXX_RESULTSET_H</font>00023 <font class="preprocessor"></font><font class="preprocessor">#define __ODBCXX_RESULTSET_H</font>00024 <font class="preprocessor"></font>00025 <font class="preprocessor">#include &lt;odbc++/setup.h&gt;</font>00026 <font class="preprocessor">#include &lt;odbc++/types.h&gt;</font>00027 <font class="preprocessor">#include &lt;odbc++/errorhandler.h&gt;</font>00028 <font class="preprocessor">#include &lt;odbc++/statement.h&gt;</font>00029 00030 00031 <font class="keyword">namespace </font>odbc {00032 00033   <font class="keyword">class </font>ResultSetMetaData;00034   <font class="keyword">class </font>Statement;00035   <font class="keyword">class </font>Rowset;00036 <a name="l00038"></a><a class="code" href="classodbc_1_1_result_set.html">00038</a>   <font class="keyword">class </font>ODBCXX_EXPORT ResultSet : <font class="keyword">public</font> ErrorHandler {00039     <font class="keyword">friend</font> <font class="keyword">class </font>Statement;00040     <font class="keyword">friend</font> <font class="keyword">class </font>ResultSetMetaData;00041     00042   <font class="keyword">private</font>:00043     Statement* statement_;00044     SQLHSTMT hstmt_;00045     <font class="keywordtype">bool</font> ownStatement_;00046 00047 00048     <font class="keywordtype">int</font> currentFetchSize_;00049     <font class="keywordtype">int</font> newFetchSize_;00050 00051     Rowset* rowset_;00052     SQLUSMALLINT* rowStatus_;00053     SQLUINTEGER rowsInRowset_;00054 00055     <font class="comment">//tells us if the columns are bound right now</font>00056     <font class="keywordtype">bool</font> colsBound_;00057     <font class="keywordtype">bool</font> streamedColsBound_;00058 00059     <font class="comment">//the position in the rowset last time we did a bind</font>00060     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> bindPos_;00061 00062     <font class="comment">//meta data - it's always there since we need info from it</font>00063     ResultSetMetaData* metaData_;00064 00065     <font class="keywordtype">int</font> location_;00066     00067     <font class="keywordtype">bool</font> lastWasNull_;00068 00069     <font class="keywordtype">int</font> rowBeforeInsert_;00070     <font class="keywordtype">int</font> locBeforeInsert_;00071 00072     ResultSet(Statement* stmt,SQLHSTMT hstmt, <font class="keywordtype">bool</font> ownStmt);00073     00074     <font class="comment">//driver info</font>00075     <font class="keyword">const</font> DriverInfo* _getDriverInfo()<font class="keyword"> const </font>{00076       <font class="keywordflow">return</font> statement_-&gt;_getDriverInfo();00077     }00078 00079     <font class="comment">//private utils</font>00080     <font class="keywordtype">void</font> _applyFetchSize();00081     <font class="comment">//this makes sure there is a rowset </font>00082     <font class="keywordtype">void</font> _resetRowset();00083 00084     <font class="comment">//this should be called before any call to SQLExtendedFetch</font>00085     <font class="keywordtype">void</font> _prepareForFetch();00086     <font class="comment">//this performs a possibly scrolled fetch with fetchType to rownum</font>00087     <font class="keywordtype">void</font> _doFetch(<font class="keywordtype">int</font> fetchType, <font class="keywordtype">int</font> rowNum);00088 00089     <font class="comment">//this should be called after the position in the rowset changes</font>00090     SQLRETURN _applyPosition(<font class="keywordtype">int</font> mode =SQL_POSITION);00091 00092     <font class="comment">//these bind/unbind all non-streamed columns</font>00093     <font class="keywordtype">void</font> _bindCols();00094     <font class="keywordtype">void</font> _unbindCols();00095 00096     <font class="comment">//these bind/unbind all streamed columns</font>00097     <font class="keywordtype">void</font> _bindStreamedCols();00098     <font class="keywordtype">void</font> _unbindStreamedCols();00099     00100     <font class="comment">//this sends all needed data from streamed columns</font>00101     <font class="comment">//to be called from insertRow and updateRow</font>00102     <font class="keywordtype">void</font> _handleStreams(SQLRETURN r);00103     00104 00105   <font class="keyword">public</font>:00107     <font class="keyword">virtual</font> ~ResultSet();00108     00109     <font class="comment">//remember to update DatabaseMetaData when changing those values</font>00110 00113     <font class="keyword">enum</font> {00115       CONCUR_READ_ONLY,00117       CONCUR_UPDATABLE00118     };00119 00120 00123     <font class="keyword">enum</font> {00125       TYPE_FORWARD_ONLY,00129       TYPE_SCROLL_INSENSITIVE,00131       TYPE_SCROLL_SENSITIVE00132     };00133 00140     <font class="keywordtype">bool</font> absolute(<font class="keywordtype">int</font> row);00141 00147     <font class="keywordtype">bool</font> relative(<font class="keywordtype">int</font> rows);00148 00150     <font class="keywordtype">void</font> afterLast();00151 00153     <font class="keywordtype">void</font> beforeFirst();00154 00156     <font class="keywordtype">bool</font> isAfterLast();00157 00159     <font class="keywordtype">bool</font> isBeforeFirst();00160 00162     <font class="keywordtype">bool</font> isFirst();00163 00166     <font class="keywordtype">bool</font> isLast();00167 00172     <font class="keywordtype">int</font> getRow();00173 00177     <font class="keywordtype">bool</font> next();00178 00182     <font class="keywordtype">bool</font> previous();00183 00187     <font class="keywordtype">bool</font> first();00188 00192     <font class="keywordtype">bool</font> last();00193 00199     <font class="keywordtype">void</font> moveToInsertRow();00200     00204     <font class="keywordtype">void</font> moveToCurrentRow();00205 00207     <font class="keywordtype">void</font> refreshRow();00208 00210     <font class="keywordtype">void</font> deleteRow();00211 00216     <font class="keywordtype">void</font> insertRow();00217 00219     <font class="keywordtype">void</font> updateRow();00220 00222     <font class="keywordtype">void</font> cancelRowUpdates();00223 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -