📄 databasemetadata_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++/databasemetadata.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++/databasemetadata.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_DATABASEMETADATA_H</font>00023 <font class="preprocessor"></font><font class="preprocessor">#define __ODBCXX_DATABASEMETADATA_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++/connection.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="l00043"></a><a class="code" href="classodbc_1_1_database_meta_data.html">00043</a> <font class="keyword">class </font>ODBCXX_EXPORT DatabaseMetaData {00044 <font class="keyword">friend</font> <font class="keyword">class </font>Connection;00045 <font class="keyword">friend</font> <font class="keyword">class </font>DriverInfo;00046 00047 <font class="keyword">private</font>:00048 Connection* connection_;00049 00050 DatabaseMetaData(Connection* c);00051 ~DatabaseMetaData();00052 00053 <font class="keyword">const</font> DriverInfo* _getDriverInfo()<font class="keyword"> const </font>{00054 <font class="keywordflow">return</font> connection_->_getDriverInfo();00055 }00056 00057 SQLUSMALLINT _getNumeric16(<font class="keywordtype">int</font> what);00058 SQLUINTEGER _getNumeric32(<font class="keywordtype">int</font> what);00059 00060 ODBCXX_STRING _getStringInfo(<font class="keywordtype">int</font> what);00061 <font class="keywordtype">bool</font> _ownXXXAreVisible(<font class="keywordtype">int</font> type, <font class="keywordtype">int</font> what);00062 00063 <font class="preprocessor">#if ODBCVER >= 0x0300</font>00064 <font class="preprocessor"></font> <font class="comment">// returns all CA1 or-ed together</font>00065 SQLUINTEGER _getAllCursorAttributes1();00066 <font class="preprocessor">#endif</font>00067 <font class="preprocessor"></font>00068 <font class="keyword">public</font>:00069 <a name="l00071"></a><a class="code" href="classodbc_1_1_database_meta_data.html#a0">00071</a> Connection* getConnection() {00072 <font class="keywordflow">return</font> connection_;00073 }00074 00076 <font class="keyword">enum</font> {00077 bestRowTemporary = SQL_SCOPE_CURROW,00078 bestRowTransaction = SQL_SCOPE_TRANSACTION,00079 bestRowSession = SQL_SCOPE_SESSION00080 };00081 00083 <font class="keyword">enum</font> {00084 bestRowUnknown = SQL_PC_UNKNOWN,00085 bestRowPseudo = SQL_PC_PSEUDO,00086 bestRowNotPseudo = SQL_PC_NOT_PSEUDO00087 };00088 00089 00093 <font class="keyword">enum</font> {00094 versionColumnNotPseudo = SQL_PC_NOT_PSEUDO,00095 versionColumnPseudo = SQL_PC_PSEUDO,00096 versionColumnUnknown = SQL_PC_UNKNOWN00097 };00098 00099 00103 <font class="keyword">enum</font> {00104 typeNoNulls = SQL_NO_NULLS,00105 typeNullable = SQL_NULLABLE,00106 typeNullableUnknown = SQL_NULLABLE_UNKNOWN00107 };00108 00113 <font class="keyword">enum</font> {00114 columnNoNulls = SQL_NO_NULLS,00115 columnNullable = SQL_NULLABLE,00116 columnNullableUnknown = SQL_NULLABLE_UNKNOWN00117 };00118 00120 <font class="keyword">enum</font> {00122 typePredNone = SQL_UNSEARCHABLE,00124 typePredChar = SQL_LIKE_ONLY,00126 typePredBasic = SQL_ALL_EXCEPT_LIKE,00128 typeSearchable = SQL_SEARCHABLE00129 };00130 00131 00135 <font class="preprocessor">#if ODBCVER >= 0x0300</font>00136 <font class="preprocessor"></font> <font class="keyword">enum</font> {00137 importedKeyCascade = SQL_CASCADE,00138 importedKeySetNull = SQL_SET_NULL,00139 importedKeySetDefault = SQL_SET_DEFAULT,00140 importedKeyNoAction = SQL_NO_ACTION,00141 importedKeyRestrict = SQL_RESTRICT00142 };00143 <font class="preprocessor">#else</font>00144 <font class="preprocessor"></font> <font class="comment">// workaround mode on</font>00145 <font class="keyword">enum</font> {00146 importedKeyCascade = SQL_CASCADE,00147 importedKeySetNull = SQL_SET_NULL,00148 importedKeyRestrict = SQL_RESTRICT,00149 importedKeyNoAction = SQL_RESTRICT,00150 importedKeySetDefault00151 };00152 00153 <font class="preprocessor">#endif</font>00154 <font class="preprocessor"></font>00155 <font class="preprocessor">#if ODBCVER >= 0x0300</font>00156 <font class="preprocessor"></font><font class="preprocessor">#if !defined(SQL_NOT_DEFERRABLE)</font>00157 <font class="preprocessor"></font><font class="preprocessor"># warning "Your sqlext.h is missing SQL_NOT_DEFERRABLE, consider upgrading"</font>00158 <font class="preprocessor"></font><font class="preprocessor"># define SQL_NOT_DEFERRABLE 7</font>00159 <font class="preprocessor"></font><font class="preprocessor">#endif</font>00160 <font class="preprocessor"></font>00161 <font class="keyword">enum</font> {00162 importedKeyInitiallyDeferred = SQL_INITIALLY_DEFERRED,00163 importedKeyInitiallyImmediate = SQL_INITIALLY_IMMEDIATE,00164 importedKeyNotDeferrable = SQL_NOT_DEFERRABLE00165 };00166 <font class="preprocessor">#endif</font>00167 <font class="preprocessor"></font>00169 <font class="keyword">enum</font> {00170 tableIndexClustered = SQL_INDEX_CLUSTERED,00171 tableIndexHashed = SQL_INDEX_HASHED,00172 tableIndexOther = SQL_INDEX_OTHER,00173 tableIndexStatistic = SQL_TABLE_STAT00174 };00175 00179 <font class="keyword">enum</font> {00180 procedureColumnIn = SQL_PARAM_INPUT,00181 procedureColumnInOut = SQL_PARAM_INPUT_OUTPUT,00182 procedureColumnOut = SQL_PARAM_OUTPUT,00183 procedureColumnResult = SQL_RESULT_COL,00184 procedureColumnReturn = SQL_RETURN_VALUE,00185 procedureColumnUnknown = SQL_PARAM_TYPE_UNKNOWN00186 };00187 00191 <font class="keyword">enum</font> {00192 procedureNoNulls = SQL_NO_NULLS,00193 procedureNullable = SQL_NULLABLE,00194 procedureNullableUnknown = SQL_NULLABLE_UNKNOWN00195 };00196 00200 <font class="keyword">enum</font> {00201 procedureReturnsResult = SQL_PT_FUNCTION,00202 procedureNoResult = SQL_PT_PROCEDURE,00203 procedureResultUnknown = SQL_PT_UNKNOWN00204 };00205 00206 00207 00210 ODBCXX_STRING getDatabaseProductName();00211 00214 ODBCXX_STRING getDatabaseProductVersion();00215 00218 ODBCXX_STRING getDriverName();00219 00222 ODBCXX_STRING getDriverVersion();00223 00225 <font class="keywordtype">int</font> getDriverMajorVersion();00226 00228 <font class="keywordtype">int</font> getDriverMinorVersion();00229 00233 ODBCXX_STRING getIdentifierQuoteString();00234 00238 ODBCXX_STRING getCatalogTerm();00239 00243 ODBCXX_STRING getSchemaTerm();00244 00247 ODBCXX_STRING getTableTerm();00248 00252 ODBCXX_STRING getProcedureTerm();00253 00256 ODBCXX_STRING getUserName();00257 00264 ODBCXX_STRING getCatalogSeparator();00265 00271 <font class="keywordtype">bool</font> isCatalogAtStart();00272 00276 ODBCXX_STRING getSQLKeywords();00277 00278 00281 <font class="keywordtype">bool</font> supportsTransactions();00282 00286 <font class="keywordtype">int</font> getDefaultTransactionIsolation();00287 00292 <font class="keywordtype">bool</font> supportsTransactionIsolationLevel(<font class="keywordtype">int</font> lev);00293 00306 <font class="keywordtype">bool</font> supportsDataDefinitionAndDataManipulationTransactions();00307 00322 <font class="keywordtype">bool</font> supportsDataManipulationTransactionsOnly();00323 00336 <font class="keywordtype">bool</font> dataDefinitionCausesTransactionCommit();00337 00350 <font class="keywordtype">bool</font> dataDefinitionIgnoredInTransactions();00351 00352 00355 <font class="keywordtype">bool</font> supportsTableCorrelationNames();00356 00359 <font class="keywordtype">bool</font> supportsDifferentTableCorrelationNames();00360 00363 <font class="keywordtype">bool</font> supportsOrderByUnrelated();00364 00367 <font class="keywordtype">bool</font> supportsExpressionsInOrderBy();00368 00373 <font class="keywordtype">bool</font> supportsOpenCursorsAcrossCommit();00374 00375 00380 <font class="keywordtype">bool</font> supportsOpenCursorsAcrossRollback();00381 00382 00387 <font class="keywordtype">bool</font> supportsOpenStatementsAcrossCommit();00388 00393 <font class="keywordtype">bool</font> supportsOpenStatementsAcrossRollback();00394 00400 <font class="keywordtype">bool</font> supportsResultSetType(<font class="keywordtype">int</font> type);00401 00408 <font class="keywordtype">bool</font> supportsResultSetConcurrency(<font class="keywordtype">int</font> type, <font class="keywordtype">int</font> concurrency);00409 00410 00412 <font class="keywordtype">bool</font> supportsCatalogsInDataManipulation();00413 00415 <font class="keywordtype">bool</font> supportsCatalogsInProcedureCalls();00416 00418 <font class="keywordtype">bool</font> supportsCatalogsInTableDefinitions();00419 00421 <font class="keywordtype">bool</font> supportsCatalogsInIndexDefinitions();00422 00424 <font class="keywordtype">bool</font> supportsCatalogsInPrivilegeDefinitions();00425 00426 00428 <font class="keywordtype">bool</font> supportsSchemasInDataManipulation();00429 00431 <font class="keywordtype">bool</font> supportsSchemasInProcedureCalls();00432 00434 <font class="keywordtype">bool</font> supportsSchemasInTableDefinitions();00435 00437 <font class="keywordtype">bool</font> supportsSchemasInIndexDefinitions();00438 00440 <font class="keywordtype">bool</font> supportsSchemasInPrivilegeDefinitions();00441 00442 00445 <font class="keywordtype">bool</font> nullPlusNonNullIsNull();00446 00450 <font class="keywordtype">bool</font> supportsColumnAliasing();00451 00454 <font class="keywordtype">bool</font> supportsConvert();00455 00458 <font class="keywordtype">bool</font> supportsConvert(<font class="keywordtype">int</font> fromType, <font class="keywordtype">int</font> toType);00459 00462 <font class="keywordtype">bool</font> supportsAlterTableWithDropColumn();00463
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -