22 #ifndef __ODBCXX_DATABASEMETADATA_H
23 #define __ODBCXX_DATABASEMETADATA_H
25 #include <odbc++/setup.h>
26 #include <odbc++/types.h>
27 #include <odbc++/connection.h>
45 friend class DriverInfo;
53 const DriverInfo* _getDriverInfo()
const {
54 return connection_->_getDriverInfo();
57 SQLUSMALLINT _getNumeric16(
int what);
58 SQLUINTEGER _getNumeric32(
int what);
60 ODBCXX_STRING _getStringInfo(
int what);
61 bool _ownXXXAreVisible(
int type,
int what);
65 SQLUINTEGER _getAllCursorAttributes1();
77 bestRowTemporary = SQL_SCOPE_CURROW,
78 bestRowTransaction = SQL_SCOPE_TRANSACTION,
79 bestRowSession = SQL_SCOPE_SESSION
84 bestRowUnknown = SQL_PC_UNKNOWN,
85 bestRowPseudo = SQL_PC_PSEUDO,
86 bestRowNotPseudo = SQL_PC_NOT_PSEUDO
94 versionColumnNotPseudo = SQL_PC_NOT_PSEUDO,
95 versionColumnPseudo = SQL_PC_PSEUDO,
96 versionColumnUnknown = SQL_PC_UNKNOWN
104 typeNoNulls = SQL_NO_NULLS,
105 typeNullable = SQL_NULLABLE,
106 typeNullableUnknown = SQL_NULLABLE_UNKNOWN
114 columnNoNulls = SQL_NO_NULLS,
115 columnNullable = SQL_NULLABLE,
116 columnNullableUnknown = SQL_NULLABLE_UNKNOWN
122 typePredNone = SQL_UNSEARCHABLE,
124 typePredChar = SQL_LIKE_ONLY,
126 typePredBasic = SQL_ALL_EXCEPT_LIKE,
128 typeSearchable = SQL_SEARCHABLE
135 #if ODBCVER >= 0x0300
137 importedKeyCascade = SQL_CASCADE,
138 importedKeySetNull = SQL_SET_NULL,
139 importedKeySetDefault = SQL_SET_DEFAULT,
140 importedKeyNoAction = SQL_NO_ACTION,
141 importedKeyRestrict = SQL_RESTRICT
146 importedKeyCascade = SQL_CASCADE,
147 importedKeySetNull = SQL_SET_NULL,
148 importedKeyRestrict = SQL_RESTRICT,
149 importedKeyNoAction = SQL_RESTRICT,
150 importedKeySetDefault
155 #if ODBCVER >= 0x0300
156 #if !defined(SQL_NOT_DEFERRABLE)
157 # warning "Your sqlext.h is missing SQL_NOT_DEFERRABLE, consider upgrading"
158 # define SQL_NOT_DEFERRABLE 7
162 importedKeyInitiallyDeferred = SQL_INITIALLY_DEFERRED,
163 importedKeyInitiallyImmediate = SQL_INITIALLY_IMMEDIATE,
164 importedKeyNotDeferrable = SQL_NOT_DEFERRABLE
170 tableIndexClustered = SQL_INDEX_CLUSTERED,
171 tableIndexHashed = SQL_INDEX_HASHED,
172 tableIndexOther = SQL_INDEX_OTHER,
173 tableIndexStatistic = SQL_TABLE_STAT
180 procedureColumnIn = SQL_PARAM_INPUT,
181 procedureColumnInOut = SQL_PARAM_INPUT_OUTPUT,
182 procedureColumnOut = SQL_PARAM_OUTPUT,
183 procedureColumnResult = SQL_RESULT_COL,
184 procedureColumnReturn = SQL_RETURN_VALUE,
185 procedureColumnUnknown = SQL_PARAM_TYPE_UNKNOWN
192 procedureNoNulls = SQL_NO_NULLS,
193 procedureNullable = SQL_NULLABLE,
194 procedureNullableUnknown = SQL_NULLABLE_UNKNOWN
201 procedureReturnsResult = SQL_PT_FUNCTION,
202 procedureNoResult = SQL_PT_PROCEDURE,
203 procedureResultUnknown = SQL_PT_UNKNOWN
210 ODBCXX_STRING getDatabaseProductName();
214 ODBCXX_STRING getDatabaseProductVersion();
218 ODBCXX_STRING getDriverName();
222 ODBCXX_STRING getDriverVersion();
225 int getDriverMajorVersion();
228 int getDriverMinorVersion();
233 ODBCXX_STRING getIdentifierQuoteString();
238 ODBCXX_STRING getCatalogTerm();
243 ODBCXX_STRING getSchemaTerm();
247 ODBCXX_STRING getTableTerm();
252 ODBCXX_STRING getProcedureTerm();
256 ODBCXX_STRING getUserName();
264 ODBCXX_STRING getCatalogSeparator();
271 bool isCatalogAtStart();
276 ODBCXX_STRING getSQLKeywords();
281 bool supportsTransactions();
286 int getDefaultTransactionIsolation();
292 bool supportsTransactionIsolationLevel(
int lev);
306 bool supportsDataDefinitionAndDataManipulationTransactions();
322 bool supportsDataManipulationTransactionsOnly();
336 bool dataDefinitionCausesTransactionCommit();
350 bool dataDefinitionIgnoredInTransactions();
355 bool supportsTableCorrelationNames();
359 bool supportsDifferentTableCorrelationNames();
363 bool supportsOrderByUnrelated();
367 bool supportsExpressionsInOrderBy();
373 bool supportsOpenCursorsAcrossCommit();
380 bool supportsOpenCursorsAcrossRollback();
387 bool supportsOpenStatementsAcrossCommit();
393 bool supportsOpenStatementsAcrossRollback();
400 bool supportsResultSetType(
int type);
408 bool supportsResultSetConcurrency(
int type,
int concurrency);
412 bool supportsCatalogsInDataManipulation();
415 bool supportsCatalogsInProcedureCalls();
418 bool supportsCatalogsInTableDefinitions();
421 bool supportsCatalogsInIndexDefinitions();
424 bool supportsCatalogsInPrivilegeDefinitions();
428 bool supportsSchemasInDataManipulation();
431 bool supportsSchemasInProcedureCalls();
434 bool supportsSchemasInTableDefinitions();
437 bool supportsSchemasInIndexDefinitions();
440 bool supportsSchemasInPrivilegeDefinitions();
445 bool nullPlusNonNullIsNull();
450 bool supportsColumnAliasing();
454 bool supportsConvert();
458 bool supportsConvert(
int fromType,
int toType);
462 bool supportsAlterTableWithDropColumn();
466 bool supportsAlterTableWithAddColumn();
471 ODBCXX_STRING getExtraNameCharacters();
475 ODBCXX_STRING getSearchStringEscape();
479 ODBCXX_STRING getTimeDateFunctions();
483 ODBCXX_STRING getSystemFunctions();
487 ODBCXX_STRING getStringFunctions();
491 ODBCXX_STRING getNumericFunctions();
495 bool supportsLikeEscapeClause();
499 bool supportsMultipleResultSets();
504 bool supportsMultipleTransactions();
508 bool supportsNonNullableColumns();
512 bool supportsMinimumSQLGrammar();
516 bool supportsCoreSQLGrammar();
520 bool supportsExtendedSQLGrammar();
526 bool supportsANSI92EntryLevelSQL();
531 bool supportsANSI92IntermediateSQL();
535 bool supportsANSI92FullSQL();
542 bool supportsPositionedDelete();
549 bool supportsPositionedUpdate();
556 bool supportsSelectForUpdate();
562 bool supportsIntegrityEnhancementFacility();
566 bool supportsBatchUpdates();
570 bool supportsSubqueriesInComparisons();
575 bool supportsSubqueriesInExists();
580 bool supportsSubqueriesInIns();
585 bool supportsSubqueriesInQuantifieds();
590 bool supportsCorrelatedSubqueries();
596 bool ownUpdatesAreVisible(
int type);
601 bool ownDeletesAreVisible(
int type);
606 bool ownInsertsAreVisible(
int type);
612 bool othersUpdatesAreVisible(
int type);
618 bool othersDeletesAreVisible(
int type);
624 bool othersInsertsAreVisible(
int type);
630 bool deletesAreDetected(
int type);
636 bool insertsAreDetected(
int type);
642 bool updatesAreDetected(
int type);
648 int getMaxBinaryLiteralLength();
652 int getMaxCharLiteralLength();
656 int getMaxColumnNameLength();
661 int getMaxColumnsInGroupBy();
665 int getMaxColumnsInIndex();
670 int getMaxColumnsInOrderBy();
674 int getMaxColumnsInSelect();
678 int getMaxColumnsInTable();
682 int getMaxCursorNameLength();
686 int getMaxIndexLength();
690 int getMaxSchemaNameLength();
694 int getMaxProcedureNameLength();
698 int getMaxCatalogNameLength();
707 bool doesMaxRowSizeIncludeBlobs();
712 int getMaxStatementLength();
716 int getMaxTableNameLength();
721 int getMaxTablesInSelect();
725 int getMaxUserNameLength();
730 int getMaxConnections();
735 int getMaxStatements();
741 bool supportsMixedCaseIdentifiers();
746 bool supportsMixedCaseQuotedIdentifiers();
751 bool supportsStoredProcedures();
757 bool supportsGroupBy();
762 bool supportsGroupByUnrelated();
767 bool supportsGroupByBeyondSelect();
772 bool supportsUnion();
776 bool supportsUnionAll();
781 bool supportsOuterJoins();
785 bool supportsFullOuterJoins();
790 bool supportsLimitedOuterJoins();
793 bool usesLocalFilePerTable();
796 bool usesLocalFiles();
801 bool nullsAreSortedAtStart();
806 bool nullsAreSortedAtEnd();
810 bool nullsAreSortedHigh();
814 bool nullsAreSortedLow();
819 bool allProceduresAreCallable();
824 bool allTablesAreSelectable();
834 bool storesLowerCaseIdentifiers();
839 bool storesLowerCaseQuotedIdentifiers();
844 bool storesMixedCaseIdentifiers();
849 bool storesMixedCaseQuotedIdentifiers();
854 bool storesUpperCaseIdentifiers();
859 bool storesUpperCaseQuotedIdentifiers();
908 ResultSet* getTypeInfo();
945 ResultSet* getColumns(
const ODBCXX_STRING& catalog,
946 const ODBCXX_STRING& schemaPattern,
947 const ODBCXX_STRING& tableNamePattern,
948 const ODBCXX_STRING& columnNamePattern);
965 ResultSet* getTables(
const ODBCXX_STRING& catalog,
966 const ODBCXX_STRING& schemaPattern,
967 const ODBCXX_STRING& tableNamePattern,
968 const std::vector<ODBCXX_STRING>& types);
994 ResultSet* getTablePrivileges(
const ODBCXX_STRING& catalog,
995 const ODBCXX_STRING& schemaPattern,
996 const ODBCXX_STRING& tableNamePattern);
1021 ResultSet* getColumnPrivileges(
const ODBCXX_STRING& catalog,
1022 const ODBCXX_STRING& schema,
1023 const ODBCXX_STRING& table,
1024 const ODBCXX_STRING& columnNamePattern);
1041 ResultSet* getPrimaryKeys(
const ODBCXX_STRING& catalog,
1042 const ODBCXX_STRING& schema,
1043 const ODBCXX_STRING& table);
1091 ResultSet* getIndexInfo(
const ODBCXX_STRING& catalog,
1092 const ODBCXX_STRING& schema,
1093 const ODBCXX_STRING& table,
1094 bool unique,
bool approximate);
1140 ResultSet* getCrossReference(
const ODBCXX_STRING& primaryCatalog,
1141 const ODBCXX_STRING& primarySchema,
1142 const ODBCXX_STRING& primaryTable,
1143 const ODBCXX_STRING& foreignCatalog,
1144 const ODBCXX_STRING& foreignSchema,
1145 const ODBCXX_STRING& foreignTable);
1156 const ODBCXX_STRING& schema,
1157 const ODBCXX_STRING& table) {
1158 return this->getCrossReference(ODBCXX_STRING_CONST(
""),
1159 ODBCXX_STRING_CONST(
""),
1160 ODBCXX_STRING_CONST(
""),
1173 const ODBCXX_STRING& schema,
1174 const ODBCXX_STRING& table) {
1175 return this->getCrossReference(catalog,
1178 ODBCXX_STRING_CONST(
""),
1179 ODBCXX_STRING_CONST(
""),
1180 ODBCXX_STRING_CONST(
""));
1205 ResultSet* getProcedures(
const ODBCXX_STRING& catalog,
1206 const ODBCXX_STRING& schemaPattern,
1207 const ODBCXX_STRING& procedureNamePattern);
1248 ResultSet* getProcedureColumns(
const ODBCXX_STRING& catalog,
1249 const ODBCXX_STRING& schemaPattern,
1250 const ODBCXX_STRING& procedureNamePattern,
1251 const ODBCXX_STRING& columnNamePattern);
1289 ResultSet* getBestRowIdentifier(
const ODBCXX_STRING& catalog,
1290 const ODBCXX_STRING& schema,
1291 const ODBCXX_STRING& table,
1317 ResultSet* getVersionColumns(
const ODBCXX_STRING& catalog,
1318 const ODBCXX_STRING& schema,
1319 const ODBCXX_STRING& table);
1349 #endif // __ODBCXX_DATABASEMETADATA_H
The namespace where all libodbc++ classes reside.
Definition: callablestatement.h:29
A database connection.
Definition: connection.h:38
A result set.
Definition: resultset.h:38