Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

GQL::DatabaseMetaData Class Reference

Information about the database. More...

#include <database-metadata.h>

List of all members.

Public Types

enum  ImportedKeyUpdateRule {
  ImportedKeyNoAction, ImportedKeySetDefault, ImportedKeySetNull, ImportedKeyCascade,
  ImportedKeyRestrict
}
enum  ImportedKeyDeferrability { ImportedKeyInitiallyDeferred, ImportedKeyInitiallyImmediate, ImportedKeyNotDeferrable }
enum  ColumnNullability { ColumnNoNulls, ColumnNullable, ColumnNullableUnknown }
enum  TableIndexType { TableIndexStatistic, TableIndexClustered, TableIndexHashed, TableIndexOther }

Public Member Functions

virtual ResultSetget_tables (const std::string &catalog, const std::string &schema, const std::string &table_name_pattern, const std::vector< std::string > &types)=0
 Get information about tables.

virtual ResultSetget_columns (const std::string &catalog, const std::string &schema, const std::string &table_name_pattern, const std::string &column_name_pattern)=0
virtual ResultSetget_primary_keys (const std::string &catalog, const std::string &schema, const std::string &table)=0
 Get a description of a table's primary key columns.

virtual ResultSetget_cross_reference (const std::string &primary_catalog, const std::string &primary_schema, const std::string &primary_table, const std::string &foreign_catalog, const std::string &foreign_schema, const std::string &foreign_table)=0
 Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key columns of the given primary key table (describe how one table imports another's key).

virtual ResultSetget_imported_keys (const std::string &catalog, const std::string &schema, const std::string &table)=0
virtual ResultSetget_exported_keys (const std::string &catalog, const std::string &schema, const std::string &table)=0
virtual ResultSetget_index_info (const std::string &catalog, const std::string &schema, const std::string &table, bool unique, bool approximate)=0
 Get a description of a table's indices and statistics.


Detailed Description

Information about the database.

This class provides information about the structure and capabilities of a database.


Member Enumeration Documentation

enum GQL::DatabaseMetaData::ColumnNullability
 

Enumeration values:
ColumnNoNulls  might not allow NULL values
ColumnNullable  definitely allows NULL values
ColumnNullableUnknown  nullability unknown

enum GQL::DatabaseMetaData::ImportedKeyDeferrability
 

Enumeration values:
ImportedKeyInitiallyDeferred 
ImportedKeyInitiallyImmediate 
ImportedKeyNotDeferrable 

enum GQL::DatabaseMetaData::ImportedKeyUpdateRule
 

Enumeration values:
ImportedKeyNoAction 
ImportedKeySetDefault 
ImportedKeySetNull 
ImportedKeyCascade 
ImportedKeyRestrict 

enum GQL::DatabaseMetaData::TableIndexType
 

Enumeration values:
TableIndexStatistic 
TableIndexClustered 
TableIndexHashed 
TableIndexOther 


Member Function Documentation

virtual ResultSet* GQL::DatabaseMetaData::get_columns const std::string &  catalog,
const std::string &  schema,
const std::string &  table_name_pattern,
const std::string &  column_name_pattern
[pure virtual]
 

virtual ResultSet* GQL::DatabaseMetaData::get_cross_reference const std::string &  primary_catalog,
const std::string &  primary_schema,
const std::string &  primary_table,
const std::string &  foreign_catalog,
const std::string &  foreign_schema,
const std::string &  foreign_table
[pure virtual]
 

Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key columns of the given primary key table (describe how one table imports another's key).

Returns:
A result set with the following columns:
  • 0: Primary key table catalog (may be NULL)
  • 1: Primary key table schema (may be NULL)
  • 2: Primary key table name
  • 3: primary key column name
  • 4: foreign key table catalog (may be null) being exported (may be null)
  • 5: foreign key table schema (may be null) being exported (may be null)
  • 6: Foreign key table name
  • 7: foreign key column name being exported
  • 8: sequence number within foreign key
  • 9: What happens to foreign key when primary is updated:
  • 10: What happens to the foreign key when primary is deleted.
  • 11: foreign key name (may be null)
  • 12: primary key name (may be null)
  • 13: can the evaluation of foreign key constraints be deferred until commit

virtual ResultSet* GQL::DatabaseMetaData::get_exported_keys const std::string &  catalog,
const std::string &  schema,
const std::string &  table
[pure virtual]
 

virtual ResultSet* GQL::DatabaseMetaData::get_imported_keys const std::string &  catalog,
const std::string &  schema,
const std::string &  table
[pure virtual]
 

virtual ResultSet* GQL::DatabaseMetaData::get_index_info const std::string &  catalog,
const std::string &  schema,
const std::string &  table,
bool  unique,
bool  approximate
[pure virtual]
 

Get a description of a table's indices and statistics.

They are ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.

Each index column description has the following columns:

  • 0: TABLE_CAT String => table catalog (may be null)
  • 1: TABLE_SCHEM String => table schema (may be null)
  • 2: TABLE_NAME String => table name
  • 3: NON_UNIQUE boolean => Can index values be non-unique? false when TYPE is tableIndexStatistic
  • 4: INDEX_QUALIFIER String => index catalog (may be null); null when TYPE is tableIndexStatistic
  • 5: INDEX_NAME String => index name; null when TYPE is tableIndexStatistic
  • 6: TYPE short => index type:
    • tableIndexStatistic - this identifies table statistics that are returned in conjuction with a table's index descriptions
    • tableIndexClustered - this is a clustered index
    • tableIndexHashed - this is a hashed index
    • tableIndexOther - this is some other style of index
  • 7: ORDINAL_POSITION short => column sequence number within index; zero when TYPE is tableIndexStatistic
  • 8: COLUMN_NAME String => column name; null when TYPE is tableIndexStatistic
  • ASC_OR_DESC String => column sort sequence, "A" => ascending "D" => descending, may be null if sort sequence is not supported; null when TYPE is tableIndexStatistic
  • CARDINALITY int => When TYPE is tableIndexStatisic then this is the number of rows in the table; otherwise it is the number of unique values in the index.
  • PAGES int => When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index.
  • FILTER_CONDITION String => Filter condition, if any. (may be null)

Parameters:
catalog a catalog name; "" retrieves those without a catalog
schema a schema name pattern; "" retrieves those without a schema
table a table name
unique when true, return only indices for unique values; when false, return indices regardless of whether unique or not
approximate when true, result is allowed to reflect approximate or out of data values; when false, results are requested to be accurate
Returns:
ResultSet each row is an index column description

virtual ResultSet* GQL::DatabaseMetaData::get_primary_keys const std::string &  catalog,
const std::string &  schema,
const std::string &  table
[pure virtual]
 

Get a description of a table's primary key columns.

They are ordered by COLUMN_NAME.

Each column description has the following columns:

  1. 0. TABLE_CAT string => table catalog (may be null)
  2. 1. TABLE_SCHEM string => table schema (may be null)
  3. 2. TABLE_NAME string => table name
  4. 3. COLUMN_NAME string => column name
  5. 4. KEY_SEQ int => sequence number within primary key
  6. 5. PK_NAME string => primary key name (may be null)
Parameters:
catalog Catalog name. "" retrieves those without a catalog.
schema a Schema name pattern; "" retrieves those without a schema.
table Table name
Returns:
ResultSet of primary key column descriptions.

virtual ResultSet* GQL::DatabaseMetaData::get_tables const std::string &  catalog,
const std::string &  schema,
const std::string &  table_name_pattern,
const std::vector< std::string > &  types
[pure virtual]
 

Get information about tables.

Retrieves a description of the tables available in the catalog. Only table descriptions matching catalog, schema, table_name_pattern and one of types are returned. They are ordered by type, schema and name. The table descriptions have the following columns:

  • 0. TABLE_CAT string => table catalog (may be null)
  • 1. TABLE_SCHEM string => table schema (may be null)
  • 2. TABLE_NAME String => table name
  • 3. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
  • 4. REMARKS String => explanatory comment on the table
  • 5. TYPE_CAT String => the types catalog (may be null)
  • 6. TYPE_SCHEM String => the types schema (may be null)
  • 7. TYPE_NAME String => type name (may be null)
  • 8. SELF_REFERENCING_COL_NAME String => name of the designated "identifier" column of a typed table (may be null)
  • 9. REF_GENERATION String => specifies how values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", "DERIVED". (may be null)


The documentation for this class was generated from the following file:
Generated on Thu May 1 18:08:01 2003 for gql by doxygen1.3