|
nanodbc
A small C++ wrapper for the native C ODBC API
|
A resource for get catalog information from connected data source. More...
#include <nanodbc.h>
Classes | |
| class | columns |
| Result set for a list of columns in one or more tables. More... | |
| class | primary_keys |
| Result set for a list of columns that compose the primary key of a single table. More... | |
| class | procedure_columns |
| Result set for a list of procedures in the data source. More... | |
| class | procedures |
| Result set for a list of procedures in the data source. More... | |
| class | table_privileges |
| Result set for a list of tables and the privileges associated with each table. More... | |
| class | tables |
| Result set for a list of tables in the data source. More... | |
Public Member Functions | |
| catalog (connection &conn) noexcept | |
| Creates catalog operating on database accessible through the specified connection. | |
| catalog::tables | find_tables (string const &table=string(), string const &type=string(), string const &schema=string(), string const &catalog=string()) |
| Creates result set with catalogs, schemas, tables, or table types. | |
| catalog::table_privileges | find_table_privileges (string const &catalog, string const &table=string(), string const &schema=string()) |
| Creates result set with tables and the privileges associated with each table. | |
| catalog::columns | find_columns (string const &column=string(), string const &table=string(), string const &schema=string(), string const &catalog=string()) |
| Creates result set with columns in one or more tables. | |
| catalog::primary_keys | find_primary_keys (string const &table, string const &schema=string(), string const &catalog=string()) |
| Creates result set with columns that compose the primary key of a single table. | |
| catalog::procedures | find_procedures (string const &procedure=string(), string const &schema=string(), string const &catalog=string()) |
| Creates result set with catalog, schema, procedure, and procedure types. | |
| catalog::procedure_columns | find_procedure_columns (string const &column=string(), string const &procedure=string(), string const &schema=string(), string const &catalog=string()) |
| Creates result set with columns in one or more procedures. | |
| std::list< string > | list_catalogs () |
| Returns names of all catalogs (or databases) available in connected data source. | |
| std::list< string > | list_schemas () |
| Returns names of all schemas available in connected data source. | |
| std::list< string > | list_table_types () |
| Returns all available table types in the connected data source. | |
A resource for get catalog information from connected data source.
Queries are performed using the Catalog Functions in ODBC. All provided operations are convenient wrappers around the ODBC API The original ODBC behaviour should not be affected by any added processing.
| catalog::tables nanodbc::catalog::find_tables | ( | string const & | table = string(), |
| string const & | type = string(), |
||
| string const & | schema = string(), |
||
| string const & | catalog = string() |
||
| ) |
Creates result set with catalogs, schemas, tables, or table types.
Tables information is obtained by executing SQLTable function within scope of the connected database accessible with the specified connection. Since this function is implemented in terms of the SQLTables, it returns result set ordered by TABLE_TYPE, TABLE_CAT, TABLE_SCHEM, and TABLE_NAME.
All arguments are treated as the Pattern Value Arguments. Empty string argument is equivalent to passing the search pattern ''.
| catalog::table_privileges nanodbc::catalog::find_table_privileges | ( | string const & | catalog, |
| string const & | table = string(), |
||
| string const & | schema = string() |
||
| ) |
Creates result set with tables and the privileges associated with each table.
Tables information is obtained by executing SQLTablePrivileges function within scope of the connected database accessible with the specified connection. Since this function is implemented in terms of the SQLTablePrivilegess, it returns result set ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME, PRIVILEGE, and GRANTEE.
| catalog | The table catalog. It cannot contain a string search pattern. |
| schema | String search pattern for schema names, treated as the Pattern Value Arguments. |
| table | String search pattern for table names, treated as the Pattern Value Arguments. |
| catalog::columns nanodbc::catalog::find_columns | ( | string const & | column = string(), |
| string const & | table = string(), |
||
| string const & | schema = string(), |
||
| string const & | catalog = string() |
||
| ) |
Creates result set with columns in one or more tables.
Columns information is obtained by executing SQLColumns function within scope of the connected database accessible with the specified connection. Since this function is implemented in terms of the SQLColumns, it returns result set ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME, and ORDINAL_POSITION.
All arguments are treated as the Pattern Value Arguments. Empty string argument is equivalent to passing the search pattern ''.
| catalog::primary_keys nanodbc::catalog::find_primary_keys | ( | string const & | table, |
| string const & | schema = string(), |
||
| string const & | catalog = string() |
||
| ) |
Creates result set with columns that compose the primary key of a single table.
Returns result set with column names that make up the primary key for a table. The primary key information is obtained by executing SQLPrimaryKey function within scope of the connected database accessible with the specified connection.
All arguments are treated as the Pattern Value Arguments. Empty string argument is equivalent to passing the search pattern ''.
| catalog::procedures nanodbc::catalog::find_procedures | ( | string const & | procedure = string(), |
| string const & | schema = string(), |
||
| string const & | catalog = string() |
||
| ) |
Creates result set with catalog, schema, procedure, and procedure types.
Procedure information is obtained by executing SQLProcedures function within scope of the connected database accessible with the specified connection. Since this function is implemented in terms of the SQLProceduress, it returns result set ordered by PROCEDURE_CAT, PROCEDUORE_SCHEM, and PROCEDURE_NAME.
All arguments are treated as the Pattern Value Arguments. Empty string argument is equivalent to passing the search pattern ''.
| catalog::procedure_columns nanodbc::catalog::find_procedure_columns | ( | string const & | column = string(), |
| string const & | procedure = string(), |
||
| string const & | schema = string(), |
||
| string const & | catalog = string() |
||
| ) |
Creates result set with columns in one or more procedures.
Columns information is obtained by executing SQLProcedureColumns function within scope of the connected database accessible with the specified connection. Since this function is implemented in terms of the SQLProcedureColumns, it returns result set ordered by PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME, and COLUMN_TYPE.
All arguments are treated as the Pattern Value Arguments. Empty string argument is equivalent to passing the search pattern ''.
| std::list< string > nanodbc::catalog::list_catalogs | ( | ) |
Returns names of all catalogs (or databases) available in connected data source.
Executes SQLTables function with SQL_ALL_CATALOG as catalog search pattern.
| std::list< string > nanodbc::catalog::list_schemas | ( | ) |
Returns names of all schemas available in connected data source.
Executes SQLTables function with SQL_ALL_SCHEMAS as schema search pattern.
| std::list< string > nanodbc::catalog::list_table_types | ( | ) |
Returns all available table types in the connected data source.
Executes SQLTables function with SQL_ALL_TABLE_TYPES as the table type search pattern.