#include <databasemetadata.h>
"EXISTS" expressions. "IN" expressions.
| anonymous enum |
| anonymous enum |
| anonymous enum |
Nullability constants for the resultset returned by getTypes().
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| bool odbc::DatabaseMetaData::dataDefinitionCausesTransactionCommit | ( | ) |
Checks if DDL in a transaction will cause the transaction to be committed.
UPDATE, INSERT) within a transaction and any data definition (eg. CREATE TABLE) will cause the transaction to be committed.true, supportsDataDefinitionAndDataManipulationTransactions(), supportsDataManipulationTransactionsOnly() and dataDefinitionIgnoredInTransactions() all return false.
| bool odbc::DatabaseMetaData::dataDefinitionIgnoredInTransactions | ( | ) |
Checks if DDL in a transaction is ignored.
UPDATE, INSERT) within a transaction and any data definition (eg. CREATE TABLE) will be ignored.true, supportsDataDefinitionAndDataManipulationTransactions(), supportsDataManipulationTransactionsOnly() and dataDefinitionCausesTransactionCommit() all return false.
| bool odbc::DatabaseMetaData::deletesAreDetected | ( | int | type | ) |
Returns true if a deleted row can be detected with ResultSet::rowDeleted().
| type | The type of ResultSet of interest |
| ResultSet* odbc::DatabaseMetaData::getBestRowIdentifier | ( | const std::string & | catalog, | |
| const std::string & | schema, | |||
| const std::string & | table, | |||
| int | scope, | |||
| bool | nullable | |||
| ) |
Returns the optimal set of columns that identifies a row.
The returned ResultSet is ordered by SCOPE and has the following columns:
bestRowTemporary - temporary, only while a ResultSet is using the row bestRowTransaction - valid until the current transaction ends bestRowSession - valid through the whole session - until the connection is closed NULL. bestRowUnknown - it is unknown whether this is a pseudo column bestRowNotPseudo - it is definitely not a pseudo column bestRowPseudo - it is definitely a pseudo column | catalog | the catalog name | |
| schema | the schema name | |
| table | the table name | |
| scope | the scope of interest, same values as the SCOPE column. | |
| nullable | whether nullable columns should be included |
| ResultSet* odbc::DatabaseMetaData::getCatalogs | ( | ) |
Returns a list of available catalogs in the database.
The returned ResultSet is the same as with getTables(), except that all columns but TABLE_CAT are NULL values.
| std::string odbc::DatabaseMetaData::getCatalogSeparator | ( | ) |
Returns the string used to separate a catalog in a fully qualified identifier.
For example Oracle would return a "@", while mysql would say ".".
| std::string odbc::DatabaseMetaData::getCatalogTerm | ( | ) |
Returns the term for catalog used by the data source.
Can be for example "directory" or "database".
| ResultSet* odbc::DatabaseMetaData::getColumnPrivileges | ( | const std::string & | catalog, | |
| const std::string & | schema, | |||
| const std::string & | table, | |||
| const std::string & | columnNamePattern | |||
| ) |
Fetches a list of access rights for a table's columns.
The returned ResultSet is ordered by COLUMN_NAME and PRIVILEGE. It contains the following columns:
NULL) NULL) NULL). If GRANTEE owns the object, GRANTOR is "SYSTEM". "SELECT", "INSERT", "UPDATE", "DELETE", "REFERENCES" or a data source specific value "YES" if GRANTEE can grant this privilege to other users. "NO" if not. NULL if unknown. | ResultSet* odbc::DatabaseMetaData::getColumns | ( | const std::string & | catalog, | |
| const std::string & | schemaPattern, | |||
| const std::string & | tableNamePattern, | |||
| const std::string & | columnNamePattern | |||
| ) |
Fetches the available columns in a catalog.
The returned ResultSet has the following columns:
columnNoNulls - might not allow NULLs columnNullable - definitely allows NULLs columnNullableUnknown - nullability is unknown "NO" means in no way nullable, "YES" means possibly nullable. Empty string means nobody knows. | ResultSet* odbc::DatabaseMetaData::getCrossReference | ( | const std::string & | primaryCatalog, | |
| const std::string & | primarySchema, | |||
| const std::string & | primaryTable, | |||
| const std::string & | foreignCatalog, | |||
| const std::string & | foreignSchema, | |||
| const std::string & | foreignTable | |||
| ) |
Figures out in which way a foreign key table references a primary key table.
Returns it's findings in a ResultSet, ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME and KEY_SEQ. The ResultSet contains the following columns:
importedKeyNoAction - nothing happends since the primary key can not be updated importedKeyCascade - change imported key to match the primary key importedKeySetNull - update the imported key to NULL importedKeySetDefault - update the impored key to it's default value importedKeyRestrict - same as importedKeyNoAction importedKeyNoAction - nothing happends since the primary key can not be deleted importedKeyCascade - imported key is deleted as well importedKeySetNull - imported key is set to NULL importedKeySetDefault - imported key is set to it's default value importedKeyRestrict - same as importedKeyNoAction | int odbc::DatabaseMetaData::getDefaultTransactionIsolation | ( | ) |
| ResultSet* odbc::DatabaseMetaData::getExportedKeys | ( | const std::string & | catalog, | |
| const std::string & | schema, | |||
| const std::string & | table | |||
| ) |
Fetches a list of columns that reference a table's primary keys.
The returned ResultSet is identical to the one returned by getCrossReference().
| std::string odbc::DatabaseMetaData::getIdentifierQuoteString | ( | ) |
Returns the string that can be used to quote identifiers.
If the data source doesn't support it, returns an empty string.
| ResultSet* odbc::DatabaseMetaData::getImportedKeys | ( | const std::string & | catalog, | |
| const std::string & | schema, | |||
| const std::string & | table | |||
| ) |
Fetches a list of columns that are foreign keys to other tables' primary keys.
The returned ResultSet is identical to the one returned by getCrossReference(), except it's ordered by PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME and KEY_SEQ.
| ResultSet* odbc::DatabaseMetaData::getIndexInfo | ( | const std::string & | catalog, | |
| const std::string & | schema, | |||
| const std::string & | table, | |||
| bool | unique, | |||
| bool | approximate | |||
| ) |
Fetches a list of indices and statistics for a table.
The returned ResultSet is ordered by NON_UNIQUE, TYPE, INDEX_QUALIFIER, INDEX_NAME and ORDINAL_POSITION. It contains the following columns:
NULL) NULL) true if index values can be non-unique. NULL if TYPE is tableIndexStatistic NULL if TYPE is tableIndexStatistic NULL if TYPE is tableIndexStatistic tableIndexStatistic - no real index - a statistic for the table tableIndexClustered - this index is clustered tableIndexHashed - this index is hashed tableIndexOther - this is some other kind of index NULL if TYPE is tableIndexStatistic. NULL if TYPE is tableIndexStatistic. "A" for ascending, "D" for descending index. NULL if TYPE is tableIndexStatistic. TYPE is tableIndexStatistic, the number of rows in the table. Otherwise, the number of unique values in the index. TYPE is tableIndexStatistic. Otherwise the number of pages used for the index. | catalog | the catalog name | |
| schema | the schema name | |
| table | the table name | |
| unique | whether only unique indices should be looked at | |
| approximate | whether only accurate values should be retrieved |
| int odbc::DatabaseMetaData::getMaxTablesInSelect | ( | ) |
Returns the maximum number of tables that can be joined at once.
| ResultSet* odbc::DatabaseMetaData::getPrimaryKeys | ( | const std::string & | catalog, | |
| const std::string & | schema, | |||
| const std::string & | table | |||
| ) |
Fetches a list of primary keys for a table.
The returned ResultSet is ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME and KEY_SEQ. It contains the following columns:
NULL) NULL) NULL. | ResultSet* odbc::DatabaseMetaData::getProcedureColumns | ( | const std::string & | catalog, | |
| const std::string & | schemaPattern, | |||
| const std::string & | procedureNamePattern, | |||
| const std::string & | columnNamePattern | |||
| ) |
Returns available procedure columns in a catalog.
The returned ResultSet is ordered by PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME and COLUMN_NAME. It contains the following columns:
procedureColumnUnknown - beats the driver procedureColumnIn - IN parameter procedureColumnInOut - IN OUT parameter procedureColumnOut - OUT parameter procedureColumnReturn - procedure return value (eg. this procedure is actually a function) procedureColumnResult - this column is part of a ResultSet this procedure returns procedureNoNulls - not nullable procedureNullable - nullable procedureNullableUnknown - nobody knows Note: more columns can be returned depending on the driver.
| ResultSet* odbc::DatabaseMetaData::getProcedures | ( | const std::string & | catalog, | |
| const std::string & | schemaPattern, | |||
| const std::string & | procedureNamePattern | |||
| ) |
Returns available procedures in a catalog.
The returned ResultSet is ordered by PROCEDURE_CAT, PROCEDURE_SCHEM and PROCEDURE_NAME. It contains the following columns:
procedureResultUnknown - can possibly return a result, but nobody is sure procedureNoResult - does not return a result procedureReturnsResult - returns a result | ResultSet* odbc::DatabaseMetaData::getSchemas | ( | ) |
Returns a list of available schemas in the database.
The returned ResultSet is the same as with getTables(), except that all columns but TABLE_SCHEM contain NULL values.
| ResultSet* odbc::DatabaseMetaData::getTablePrivileges | ( | const std::string & | catalog, | |
| const std::string & | schemaPattern, | |||
| const std::string & | tableNamePattern | |||
| ) |
Fetches a list of access rights for tables in a catalog.
A table privilege applies to one or more columns in a table. Do not assume that this privilege is valid for all columns.
The returned ResultSet is ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME and PRIVILEGE. It contains the following columns:
NULL) NULL) NULL). If GRANTEE owns the object, GRANTOR is "SYSTEM". "SELECT", "INSERT", "UPDATE", "DELETE", "REFERENCES" or a data source specific value "YES" if GRANTEE can grant this privilege to other users. "NO" if not. NULL if unknown. | ResultSet* odbc::DatabaseMetaData::getTables | ( | const std::string & | catalog, | |
| const std::string & | schemaPattern, | |||
| const std::string & | tableNamePattern, | |||
| const std::vector< std::string > & | types | |||
| ) |
Fetches the available tables in the data source.
The returned ResultSet has the following columns:
| catalog | the catalog name | |
| schemaPattern | schema name search pattern | |
| tableNamePattern | table name search pattern | |
| types | a list of table types. An empty list returns all table types. |
| ResultSet* odbc::DatabaseMetaData::getTableTypes | ( | ) |
Fetches the table types the database supports.
The returned ResultSet is the same as with getTables(), except that all columns but TABLE_TYPE contain NULL values.
| ResultSet* odbc::DatabaseMetaData::getTypeInfo | ( | ) |
Fetches a list of data types supported by this data source.
The returned ResultSet is ordered by DATA_TYPE and then by how closely the type maps to the corresponding ODBC SQL type. It contains the following columns:
NULL. NULL. NULLs: typeNoNulls - no typeNullable - yes, can be nullable typeNullableUnknown - nobody knows WHERE-clauses: typePredNone - no typePredChar - yes, but only with a LIKE predicate typePredBasic - yes, except in a LIKE predicate typeSearchable - yes true if this type is unsigned NULL if not applicable. NULL. | ResultSet* odbc::DatabaseMetaData::getVersionColumns | ( | const std::string & | catalog, | |
| const std::string & | schema, | |||
| const std::string & | table | |||
| ) |
Returns a list of columns for a table that are automatically updated when anything in a row is updated.
The returned ResultSet has the following unordered columns:
NULL. versionColumnUnknown - it is unknown whether this is a pseudo column versionColumnNotPseudo - it is definitely not a pseudo column versionColumnPseudo - it is definitely a pseudo column | bool odbc::DatabaseMetaData::insertsAreDetected | ( | int | type | ) |
Returns true if an inserted row can be detected with ResultSet::rowInserted().
| type | The type of ResultSet of interest |
| bool odbc::DatabaseMetaData::isCatalogAtStart | ( | ) |
Returns true if the catalog is positioned at the beginning of a fully qualified identifier.
For example mysql would say true, while oracle would say false.
| bool odbc::DatabaseMetaData::othersDeletesAreVisible | ( | int | type | ) |
| bool odbc::DatabaseMetaData::othersInsertsAreVisible | ( | int | type | ) |
| bool odbc::DatabaseMetaData::othersUpdatesAreVisible | ( | int | type | ) |
Returns true if rows updated by others are visible with their new values.
| type | The type of ResultSet of interest |
| bool odbc::DatabaseMetaData::ownDeletesAreVisible | ( | int | type | ) |
| bool odbc::DatabaseMetaData::ownInsertsAreVisible | ( | int | type | ) |
| bool odbc::DatabaseMetaData::ownUpdatesAreVisible | ( | int | type | ) |
| bool odbc::DatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions | ( | ) |
Checks if the data source supports both DML and DDL in transactions.
true if the data source supports both data manipulation (eg. UPDATE, INSERT) and data definition (eg. CREATE TABLE) within a transaction.true, supportsDataManipulationTransactionsOnly(), dataDefinitionCausesTransactionCommit() and dataDefinitionIgnoredInTransactions() all return false.
| bool odbc::DatabaseMetaData::supportsDataManipulationTransactionsOnly | ( | ) |
Checks if the data source only supports DML in transactions.
true if the data source only supports data manipulation (eg. UPDATE, INSERT) within a transaction.CREATE TABLE) in a transaction will trigger an error.
If this method returns true, supportsDataDefinitionAndDataManipulationTransactions(), dataDefinitionCausesTransactionCommit() and dataDefinitionIgnoredInTransactions() all return false.
| bool odbc::DatabaseMetaData::supportsOpenCursorsAcrossCommit | ( | ) |
Returns true if the data source and the driver can handle open cursors (eg.
ResultSets) across a commit, or false if they are invalidated.
| bool odbc::DatabaseMetaData::supportsOpenCursorsAcrossRollback | ( | ) |
Returns true if the data source and the driver can handle open cursors (eg.
ResultSets) across a rollback, or false if they are invalidated.
| bool odbc::DatabaseMetaData::supportsPositionedDelete | ( | ) |
Checks if the data source supports positioned delete.
true if ("DELETE WHERE CURRENT OF ...") is supported | bool odbc::DatabaseMetaData::supportsPositionedUpdate | ( | ) |
Checks if the data source supports positioned update.
true if ("UPDATE ... WHERE CURRENT OF ...") is supported | bool odbc::DatabaseMetaData::supportsResultSetConcurrency | ( | int | type, | |
| int | concurrency | |||
| ) |
Returns true if the data source supports the given result set concurrency for the given result set type.
| type | The type to check for. | |
| concurrency | The concurrency level to check for. |
| bool odbc::DatabaseMetaData::supportsResultSetType | ( | int | type | ) |
Returns true if the data source supports the given result set type.
| type | The type to check for |
| bool odbc::DatabaseMetaData::supportsSelectForUpdate | ( | ) |
Checks if the data source supports.
true if ("SELECT ... FOR UPDATE") is supported | bool odbc::DatabaseMetaData::supportsTransactionIsolationLevel | ( | int | lev | ) |
Returns true if the data source supports the specified transaction isolation level.
| lev | The isolation level to check for |
| bool odbc::DatabaseMetaData::updatesAreDetected | ( | int | type | ) |
Returns true if ResultSet::rowUpdated can determine whether a row has been updated.
| type | The type of ResultSet of interest |