📄 resultsetmetadata_8h-source.html.svn-base
字号:
<!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++/resultsetmetadata.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> <a class="qindex" href="namespaces.html">Namespace List</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="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> </center><hr><h1>odbc++/resultsetmetadata.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 <manush@stendahls.net></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_RESULTSETMETADATA_H</font>00023 <font class="preprocessor"></font><font class="preprocessor">#define __ODBCXX_RESULTSETMETADATA_H</font>00024 <font class="preprocessor"></font>00025 <font class="preprocessor">#include <odbc++/setup.h></font>00026 <font class="preprocessor">#include <odbc++/types.h></font>00027 <font class="preprocessor">#include <odbc++/resultset.h></font>00028 00029 <font class="keyword">namespace </font>odbc {00030 00031 <font class="keyword">class </font>ResultSet;00032 <font class="keyword">class </font>DriverInfo;00033 <a name="l00035"></a><a class="code" href="classodbc_1_1_result_set_meta_data.html">00035</a> <font class="keyword">class </font>ODBCXX_EXPORT ResultSetMetaData {00036 <font class="keyword">friend</font> <font class="keyword">class </font>ResultSet;00037 <font class="keyword">friend</font> <font class="keyword">class </font>Statement;00038 <font class="keyword">private</font>:00039 ResultSet* resultSet_;00040 00041 <font class="keywordtype">int</font> numCols_;00042 std::vector<ODBCXX_STRING> colNames_;00043 std::vector<int> colTypes_;00044 std::vector<int> colPrecisions_;00045 std::vector<int> colScales_;00046 <font class="preprocessor">#if ODBCVER >= 0x0300</font>00047 <font class="preprocessor"></font> std::vector<int> colLengths_;00048 <font class="preprocessor">#endif</font>00049 <font class="preprocessor"></font>00050 <font class="comment">//internal stuff</font>00051 <font class="keywordtype">bool</font> needsGetData_;00052 00053 <font class="comment">//yes, both constructor and destructor are meant to be private</font>00054 ResultSetMetaData(ResultSet* rs);00055 ~ResultSetMetaData() {}00056 00057 <font class="comment">//driver info</font>00058 <font class="keyword">const</font> DriverInfo* _getDriverInfo()<font class="keyword"> const </font>{00059 <font class="keywordflow">return</font> resultSet_->_getDriverInfo();00060 }00061 00062 <font class="comment">//these fetch info about a column</font>00063 <font class="keywordtype">int</font> _getNumericAttribute(<font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> col, SQLUSMALLINT attr);00064 ODBCXX_STRING _getStringAttribute(<font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> col, SQLUSMALLINT attr, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> maxlen =255);00065 00066 <font class="comment">//this loads the above values</font>00067 <font class="keywordtype">void</font> _fetchColumnInfo();00068 00069 <font class="keyword">public</font>:00071 <font class="keyword">enum</font> {00072 columnNoNulls = SQL_NO_NULLS,00073 columnNullable = SQL_NULLABLE,00074 columnNullableUnknown = SQL_NULLABLE_UNKNOWN00075 };00076 00078 <font class="keywordtype">int</font> getColumnCount() <font class="keyword">const</font>;00079 00083 <font class="keyword">const</font> ODBCXX_STRING& getColumnName(<font class="keywordtype">int</font> column) <font class="keyword">const</font>;00084 00089 <font class="keywordtype">int</font> getColumnType(<font class="keywordtype">int</font> column) <font class="keyword">const</font>;00090 00094 <font class="keywordtype">int</font> getPrecision(<font class="keywordtype">int</font> column) <font class="keyword">const</font>;00095 00099 <font class="keywordtype">int</font> getScale(<font class="keywordtype">int</font> column) <font class="keyword">const</font>;00100 00104 <font class="keywordtype">int</font> getColumnDisplaySize(<font class="keywordtype">int</font> column);00105 00109 ODBCXX_STRING getCatalogName(<font class="keywordtype">int</font> column);00110 00114 ODBCXX_STRING getColumnLabel(<font class="keywordtype">int</font> column);00115 00119 ODBCXX_STRING getColumnTypeName(<font class="keywordtype">int</font> column);00120 00124 ODBCXX_STRING getSchemaName(<font class="keywordtype">int</font> column);00125 00129 ODBCXX_STRING getTableName(<font class="keywordtype">int</font> column);00130 00134 <font class="keywordtype">bool</font> isAutoIncrement(<font class="keywordtype">int</font> column);00135 00139 <font class="keywordtype">bool</font> isCaseSensitive(<font class="keywordtype">int</font> column);00140 00144 <font class="keywordtype">bool</font> isCurrency(<font class="keywordtype">int</font> column);00145 00149 <font class="keywordtype">bool</font> isDefinitelyWritable(<font class="keywordtype">int</font> column);00150 00154 <font class="keywordtype">int</font> isNullable(<font class="keywordtype">int</font> column);00155 00159 <font class="keywordtype">bool</font> isReadOnly(<font class="keywordtype">int</font> column);00160 00164 <font class="keywordtype">bool</font> isSearchable(<font class="keywordtype">int</font> column);00165 00169 <font class="keywordtype">bool</font> isSigned(<font class="keywordtype">int</font> column);00170 00174 <font class="keywordtype">bool</font> isWritable(<font class="keywordtype">int</font> column);00175 };00176 00177 00178 00179 } <font class="comment">// namespace odbc</font>00180 00181 00182 <font class="preprocessor">#endif // __ODBCXX_RESULTSETMETADATA_H</font></pre></div><hr><div align=center><a class=footer href="http://orcane.net/freeodbc++/">Go back to the freeodbc++ homepage</a></div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -