C Driver API 3.0.0
API for the NuoDB C Driver Library
Loading...
Searching...
No Matches
NuoDB_DatabaseMetaData Struct Reference

Metadata about a NuoDB database. More...

#include <databaseMetaData.h>

Data Fields

_NuoDB_DatabaseMetaData_state_t * _state
 
NuoDB_ResultSet *(* getColumns )(NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *tableNamePattern, const char *columnNamePattern)
 Retrieves a description of table columns.
 
const char *(* getConnectionURL )(NuoDB_DatabaseMetaData *_this)
 Returns the connection URL string.
 
const char *(* getDatabaseProductName )(NuoDB_DatabaseMetaData *_this)
 Returns the Database Product Name string.
 
const char *(* getDatabaseProductVersion )(NuoDB_DatabaseMetaData *_this)
 Returns Database Product Version string.
 
const char *(* getDatabaseVersion )(NuoDB_DatabaseMetaData *_this, unsigned int *majorVersion, unsigned int *minorVersion)
 Returns Database Product Version information.
 
int(* getDriverMajorVersion )(NuoDB_DatabaseMetaData *_this)
 Returns driver major version number.
 
int(* getDriverMinorVersion )(NuoDB_DatabaseMetaData *_this)
 Returns driver minor version number.
 
NuoDB_ResultSet *(* getFunctionColumns )(NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *functionNamePattern, const char *columnNamePattern)
 Retrieves a description of the database's user function parameters and return type.
 
NuoDB_ResultSet *(* getFunctions )(NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *functionNamePattern)
 Retrieves a description of the user functions available.
 
NuoDB_ResultSet *(* getImportedKeys )(NuoDB_DatabaseMetaData *_this, const char *schema, const char *table)
 Retrieves a description of the primary key columns that are referenced by the given table's foreign key columns (the primary keys imported by a table).
 
NuoDB_ResultSet *(* getIndexInfo )(NuoDB_DatabaseMetaData *_this, const char *schema, const char *table, nuodb_bool_t unique)
 Retrieves a description of the given table's indices and statistics.
 
NuoDB_ResultSet *(* getPrimaryKeys )(NuoDB_DatabaseMetaData *_this, const char *schema, const char *table)
 Retrieves a description of the given table's primary key columns.
 
NuoDB_ResultSet *(* getProcedureColumns )(NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *procedureNamePattern, const char *columnNamePattern)
 Retrieves a description of the database's stored procedure parameter and result columns.
 
NuoDB_ResultSet *(* getProcedures )(NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *procedureNamePattern)
 Retrieves a description of the stored procedures available in NuoDB.
 
NuoDB_ResultSet *(* getSchemas )(NuoDB_DatabaseMetaData *_this)
 Retrieves the schema names available in this database.
 
NuoDB_ResultSet *(* getTables )(NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *tableNamePattern, int typeCount, const char **types)
 Retrieves a description of the tables available in the database.
 
NuoDB_ResultSet *(* getTableTypes )(NuoDB_DatabaseMetaData *_this)
 Retrieves the table types available in this database.
 
NuoDB_ResultSet *(* getTriggers )(NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *tableNamePattern, const char *triggerNamePattern)
 Retrieves a description of the triggers stored in the database.
 
NuoDB_ResultSet *(* getTypeInfo )(NuoDB_DatabaseMetaData *_this)
 Retrieves a description of all the data types supported NuoDB.
 
nuodb_bool_t(* supportsTransactionIsolationLevel )(NuoDB_DatabaseMetaData *_this, NuoDB_TransactionIsolationLevel level)
 Checks whether NuoDB supports the given transaction isolation level.
 

Detailed Description

Metadata about a NuoDB database.

NuoDB_DatabaseMetaData is used to obtain information about a NuoDB database.

Field Documentation

◆ getColumns

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getColumns) (NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *tableNamePattern, const char *columnNamePattern)

Retrieves a description of table columns.

Only column descriptions matching the schema, table and column name criteria are returned. They are ordered by ORDINAL_POSITION.

Each column description has the following columns:

  1. TABLE_CAT const char* => table catalog ("" in NuoDB)
  2. TABLE_SCHEM const char* => table schema (may be null)
  3. TABLE_NAME const char* => table name
  4. COLUMN_NAME const char* => column name
  5. DATA_TYPE int => the type code defined by NuoDB_Type
  6. TYPE_NAME const char* => Data source dependent type name
  7. COLUMN_SIZE int => column size
  8. BUFFER_LENGTH is not used
  9. DECIMAL_DIGITS int => the number of fractional digits
  10. NUM_PREC_RADIX int => Radix; NuoDB always returns 10
  11. NULLABLE int => is NULL allowed
    NuoDB returns NUODB_NULLABLE_NONULLS (0) if NULL might not be allowed and NUODB_NULLABLE_NULLABLE (1) if NULL is definitely allowed
  12. REMARKS const char* => "" in NuoDB
  13. COLUMN_DEF const char* => default value for the column
  14. SQL_DATA_TYPE int => unused
  15. SQL_DATETIME_SUB int => unused
  16. CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
  17. ORDINAL_POSITION int => index of column in table (starting at 1)
  18. IS_NULLABLE const char* => ISO rules are used to determine the nullability for a column.
    • YES — if the column can include NULLs
    • NO — if the column cannot include NULLs
  19. SCOPE_CATALOG const char* => NuoDB always returns null
  20. SCOPE_SCHEMA const char* => NuoDB always returns null
  21. SCOPE_TABLE const char* => NuoDB always returns null
  22. SOURCE_DATA_TYPE short => NuoDB always returns null
  23. IS_AUTOINCREMENT const char* => Indicates whether this column is auto incremented
    • YES — if the column is auto incremented
    • NO — if the column is not auto incremented
  24. IS_GENERATEDCOLUMN const char* => Indicates whether this is a generated column
    • YES — if this a generated column
    • NO — if this not a generated column
Parameters
[in]schemaPatterna schema name pattern - must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]tableNamePatterna table name pattern - must match the table name as it is stored in the database
[in]columnNamePatterna column name pattern - must match the column name as it is stored in the database
Returns
ResultSet with each row representing a matching table.

◆ getConnectionURL

const char *(* NuoDB_DatabaseMetaData::getConnectionURL) (NuoDB_DatabaseMetaData *_this)

Returns the connection URL string.

Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
Returns
a pointer to the connection string.

◆ getDatabaseProductName

const char *(* NuoDB_DatabaseMetaData::getDatabaseProductName) (NuoDB_DatabaseMetaData *_this)

Returns the Database Product Name string.

Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
Returns
a pointer to the Database Product Name or NULL if an error.

◆ getDatabaseProductVersion

const char *(* NuoDB_DatabaseMetaData::getDatabaseProductVersion) (NuoDB_DatabaseMetaData *_this)

Returns Database Product Version string.

Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
Returns
a pointer to the database product version string or NULL if an error.

◆ getDatabaseVersion

const char *(* NuoDB_DatabaseMetaData::getDatabaseVersion) (NuoDB_DatabaseMetaData *_this, unsigned int *majorVersion, unsigned int *minorVersion)

Returns Database Product Version information.

Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
[out]majorVersiona pointer to a value to be filled in with the database's major version.
[out]minorVersiona pointer to a value to be filled in with the database's minor version.
Returns
a pointer to the database product version string or NULL if an error.

◆ getDriverMajorVersion

int(* NuoDB_DatabaseMetaData::getDriverMajorVersion) (NuoDB_DatabaseMetaData *_this)

Returns driver major version number.

Note
This method is deprecated and will be removed in a future release. Please use NuoDB_getDriverVersion().
Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
Returns
a integer for the driver major version number.

◆ getDriverMinorVersion

int(* NuoDB_DatabaseMetaData::getDriverMinorVersion) (NuoDB_DatabaseMetaData *_this)

Returns driver minor version number.

Note
This method is deprecated and will be removed in a future release. Please use NuoDB_getDriverVersion().
Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
Returns
a integer for the driver minor version number.

◆ getFunctionColumns

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getFunctionColumns) (NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *functionNamePattern, const char *columnNamePattern)

Retrieves a description of the database's user function parameters and return type.

Only descriptions matching the schema, function and parameter name criteria are returned. The return value, if any, is first. Next are the parameter descriptions in call order. The column descriptions follow in column number order.

Each row in the ResultSet is a parameter description, column description or return type description with the following fields:

  1. FUNCTION_CAT const char* => function catalog ("" in NuoDB)
  2. FUNCTION_SCHEM const char* => function schema (may be null)
  3. FUNCTION_NAME const char* => function name
  4. COLUMN_NAME const char* => column/parameter name
  5. COLUMN_TYPE short => kind of column/parameter:
    • NUODB_FUNCTIONCOLUMN_UNKNOWN (0) - nobody knows
    • NUODB_FUNCTIONCOLUMN_IN (1) - IN parameter
    • NUODB_FUNCTIONCOLUMN_INOUT (2) - INOUT parameter
    • NUODB_FUNCTIONCOLUMN_OUT (3) - OUT parameter
    • NUODB_FUNCTIONCOLUMN_RETURN (4) - function return value
    • NUODB_FUNCTIONCOLUMN_RESULT (5) - indicates that the parameter or column is a column in the ResultSet
  6. DATA_TYPE int => the type code defined by NUODB_Type
  7. TYPE_NAME const char* => SQL type name
  8. PRECISION int => precision
  9. LENGTH int => length in bytes of data
  10. SCALE short => scale - null is returned for data types where SCALE is not applicable.
  11. RADIX short => NuoDB always returns 0
  12. NULLABLE short => can it contain NULL, NuoDB always returns 1 (NUODB_NULLABLE_NULLABLE)
  13. REMARKS const char* => always "" in NuoDB
  14. CHAR_OCTET_LENGTH int => the maximum length of binary and character based columns. For any other datatype the returned value is a NULL
  15. ORDINAL_POSITION int => the ordinal position, starting from 1, for the input and output parameters for a function. A value of 0 is returned if this row describes the function's return value. For result set columns, it is the ordinal position of the column in the result set starting from 1. If there are multiple result sets, the column ordinal positions are implementation defined.
  16. IS_NULLABLE const char* => ISO rules are used to determine the nullability for a column.
    NuoDB always returns "", meaning the nullability for the column is unknown
  17. SPECIFIC_NAME const char* => the name which uniquely identifies this function within its schema.
    NuoDB always returns the FUNCTION_NAME here
Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
[in]schemaPatterna schema name pattern - must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]functionNamePatterna function name pattern - must match the procedure name as it is stored in the database
[in]columnNamePatterna column name pattern - must match the column name as it is stored in the database
Returns
ResultSet with each row representing a function parameter or column

◆ getFunctions

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getFunctions) (NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *functionNamePattern)

Retrieves a description of the user functions available.

Only user function descriptions matching the schema and function name criteria are returned. They are ordered by FUNCTION_SCHEM and FUNCTION_NAME.

Each function description has the the following columns:

  1. FUNCTION_CAT const char* => function catalog ("" in NuoDB)
  2. FUNCTION_SCHEM const char* => function schema (may be null)
  3. FUNCTION_NAME const char* => function name. This is the name used to invoke the function
  4. REMARKS const char* => ("" in NuoDB)
  5. FUNCTION_TYPE short => kind of function. Values are:
    • NUODB_FUNCTION_NOTABLE (1) - Does not return a table
    • NUODB_FUNCTION_RETURNSTABLE (2)- Returns a table
  6. SPECIFIC_NAME const char* => The name which uniquely identifies this function within its schema. For NuoDB, this is always the same as FUNCTION_NAME
Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
[in]schemaPatterna schema name pattern - must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]functionNamePatterna function name pattern - must match the function name as it is stored in the database
Returns
ResultSet with one row per matching function

◆ getImportedKeys

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getImportedKeys) (NuoDB_DatabaseMetaData *_this, const char *schema, const char *table)

Retrieves a description of the primary key columns that are referenced by the given table's foreign key columns (the primary keys imported by a table).

They are ordered by PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.

Each imported key column description has the following columns:

  1. PKTABLE_CAT const char* => primary key table catalog ("" in NuoDB)
  2. PKTABLE_SCHEM const char* => primary key table schema (may be null)
  3. PKTABLE_NAME const char* => primary key table name
  4. PKCOLUMN_NAME const char* => primary key column name
  5. FKTABLE_CAT const char* => foreign key table catalog ("" in NuoDB)
  6. FKTABLE_SCHEM const char* => foreign key table schema (may be null)
  7. FKTABLE_NAME const char* => foreign key table name
  8. FKCOLUMN_NAME const char* => foreign key column name
  9. KEY_SEQ short => sequence number within foreign key (a value of 1 represents the first column of the primary key, a value of 2 would represent the second column within the primary key).
  10. UPDATE_RULE short => What happens to a foreign key when the primary key is updated. Values are:
    • NUODB_IMPORTEDKEY_CASCADE (0)- change imported key to agree with primary key update
    • NUODB_IMPORTEDKEY_SETNULL (2) - change imported key to NULL if its primary key has been updated
    • NUODB_IMPORTEDKEY_NOACTION (3) - do not allow update of primary key if it has been imported
    • NUODB_IMPORTEDKEY_SETDEFAULT (4) - change imported key to default values if its primary key has been updated
  11. DELETE_RULE short => What happens to the foreign key when primary is deleted. Values are:
    • NUODB_IMPORTEDKEY_CASCADE (0) - delete rows that import a deleted key
    • NUODB_IMPORTEDKEY_SETNULL (2) - change imported key to NULL if its primary key has been deleted
    • NUODB_IMPORTEDKEY_NOACTION (3) - do not allow delete of primary key if it has been imported
    • NUODB_IMPORTEDKEY_SETDEFAULT (4) - change imported key to default if its primary key has been deleted
  12. FK_NAME const char* => foreign key name (may be null)
  13. PK_NAME const char* => primary key name (may be null)
  14. DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit. Values are:
    • NUODB_IMPORTEDKEY_INITIALLYDEFERRED (5) - see SQL92 for definition
    • NUODB_IMPORTEDKEY_INITIALLYIMMEDIATE (6) - see SQL92 for definition
    • NUODB_IMPORTEDKEY_NOTDEFERRABLE (7) - see SQL92 for definition
Parameters
[in]schemaa schema name - must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]tablea table name - must match the table name as it is stored in the database
Returns
ResultSet with each row representing a primary key column description.

◆ getIndexInfo

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getIndexInfo) (NuoDB_DatabaseMetaData *_this, const char *schema, const char *table, nuodb_bool_t unique)

Retrieves a description of the given 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:

  1. TABLE_CAT const char* => primary key table catalog ("" in NuoDB)
  2. TABLE_SCHEM const char* => table schema (may be null)
  3. TABLE_NAME const char* => table name
  4. NON_UNIQUE boolean => Can index values be non-unique.
  5. INDEX_QUALIFIER const char* => index catalog ("" in NuoDB)
  6. INDEX_NAME const char* => index name; null when TYPE is tableIndexStatistic
  7. TYPE short => index type. NuoDB always sets this to NUODB_TABLEINDEX_OTHER (3)
  8. ORDINAL_POSITION short => column sequence number within index
  9. COLUMN_NAME const char* => column name
  10. ASC_OR_DESC const char* => column sort sequence, NuoDB always sets this to NULL
  11. CARDINALITY int => Unused by NuoDB and always sets to 0
  12. PAGES int => Unused by NuoDB and always sets to 0
  13. FILTER_CONDITION const char* => Unused by NuoDB and always set to empty string
Parameters
[in]schemaa schema name - must match the schema name as it is stored in this database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]tablea table name - must match the table name as it is stored in this database
[in]uniquewhen true, return only indices for unique values; when false, return indices regardless of whether unique or not
Returns
ResultSet where each row is an index column description

◆ getPrimaryKeys

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getPrimaryKeys) (NuoDB_DatabaseMetaData *_this, const char *schema, const char *table)

Retrieves a description of the given table's primary key columns.

They are ordered by KEY_SEQ.

Each primary key column description has the following columns:

  1. TABLE_CAT const char* => table catalog ("" in NuoDB)
  2. TABLE_SCHEM const char* => table schema (may be null)
  3. TABLE_NAME const char* => table name
  4. COLUMN_NAME const char* => column name
  5. KEY_SEQ short => sequence number within primary key (a value of 1 represents the first column of the primary key, a value of 2 would represent the second column within the primary key, etc.)
  6. PK_NAME const char* => primary key name (may be null)
Parameters
[in]schemaa schema name - must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]tablea table name - must match the table name as it is stored in the database
Returns
ResultSet each row represents a primary key column description.

◆ getProcedureColumns

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getProcedureColumns) (NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *procedureNamePattern, const char *columnNamePattern)

Retrieves a description of the database's stored procedure parameter and result columns.

Only descriptions matching the schema, procedure and parameter name criteria are returned. The return value, if any, is first. Next are the parameter descriptions in call order. The column descriptions follow in column number order.

Each row in the ResultSet is a parameter description or column description with the following columns:

  1. PROCEDURE_CAT const char* => procedure catalog ("" in NuoDB)
  2. PROCEDURE_SCHEM const char* => procedure schema (may be null)
  3. PROCEDURE_NAME const char* => procedure name
  4. COLUMN_NAME const char* => column/parameter name
  5. COLUMN_TYPE short => kind of column/parameter:
    • NUODB_PROCEDURECOLUMN_UNKNOWN (0) - nobody knows
    • NUODB_PROCEDURECOLUMN_IN (1) - IN parameter
    • NUODB_PROCEDURECOLUMN_INOUT (2) - INOUT parameter
    • NUODB_PROCEDURECOLUMN_OUT (3) - OUT parameter
    • NUODB_PROCEDURECOLUMN_RETURN (4) - procedure return value
    • NUODB_PROCEDURECOLUMN_RESULT (5) - result column in ResultSet
  6. DATA_TYPE int => the type code defined by NuoDB_Type
  7. TYPE_NAME const char* => SQL type name
  8. PRECISION int => precision
  9. LENGTH int => length in bytes of data
  10. SCALE short => scale (null is returned for data types) where SCALE is not applicable.
  11. RADIX short => NuoDB always returns 0
  12. NULLABLE short => can it contain NULL, NuoDB always returns 1 (NUODB_NULLABLE_NULLABLE)
  13. REMARKS const char* => always empty string in NuoDB
  14. COLUMN_DEF const char* => default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be null)
    NuoDB always returns NULL meaning a default value was not specified
  15. SQL_DATA_TYPE int => reserved for future use
  16. SQL_DATETIME_SUB int => reserved for future use
  17. CHAR_OCTET_LENGTH int => the maximum length of binary and character based columns. For any other datatype the returned value is a NULL
  18. ORDINAL_POSITION int => the ordinal position, starting from 1, for the input and output parameters for a procedure. A value of 0 is returned if this row describes the procedure's return value. For result set columns, it is the ordinal position of the column in the result set starting from 1. If there are multiple result sets, the column ordinal positions are implementation defined.
  19. IS_NULLABLE const char* => ISO rules are used to determine the nullability for a column.
    NuoDB always returns an empty string, meaning the nullability for the column is unknown
  20. SPECIFIC_NAME const char* => the name which uniquely identifies this procedure within its schema.
    NuoDB always returns the PROCEDURE_NAME here

A user may not have permissions to execute any of the procedures that are returned by getProcedures()

Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
[in]schemaPatterna schema name pattern - must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]procedureNamePatterna procedure name pattern - must match the procedure name as it is stored in the database
[in]columnNamePatterna column name pattern - must match the column name as it is stored in the database
Returns
ResultSet with each row representing a stored procedure parameter or column

◆ getProcedures

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getProcedures) (NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *procedureNamePattern)

Retrieves a description of the stored procedures available in NuoDB.

Only procedure descriptions matching the schema and procedure name criteria are returned. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME.

Each procedure description has the the following columns:

  1. PROCEDURE_CAT const char* => procedure catalog ("" in NuoDB)
  2. PROCEDURE_SCHEM const char* => procedure schema (may be null)
  3. PROCEDURE_NAME const char* => procedure name
  4. reserved for future use
  5. reserved for future use
  6. reserved for future use
  7. REMARKS const char* => "" in NuoDB
  8. PROCEDURE_TYPE short => kind of procedure:
    NuoDB always returns 1 here, NUODB_PROCEDURE_NORESULT, which means the procedure does not return a value.
  9. SPECIFIC_NAME const char* => The name which uniquely identifies this procedure within its schema. For NuoDB, this is always the same as PROCEDURE_NAME

A user may not have permissions to execute any of the procedures that are returned by getProcedures()

Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
[in]schemaPatterna schema name pattern - must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]procedureNamePatterna procedure name pattern - must match the procedure name as it is stored in the database
Returns
ResultSet with one row per matching procedure

◆ getSchemas

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getSchemas) (NuoDB_DatabaseMetaData *_this)

Retrieves the schema names available in this database.

The schema columns are:

  1. TABLE_SCHEM const char* => schema name
  2. TABLE_CATALOG const char* => catalog name ("" in NuoDB)
Returns
ResultSet with each row representing a schema.

◆ getTables

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getTables) (NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *tableNamePattern, int typeCount, const char **types)

Retrieves a description of the tables available in the database.

Only table descriptions matching the schema, table name and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_SCHEMA and TABLE_NAME.

Each table description has the following columns:

  1. TABLE_CAT const char* => table catalog (always "" in NuoDB)
  2. TABLE_SCHEM const char* => table schema (may be null)
  3. TABLE_NAME const char* => table name
  4. TABLE_TYPE const char* => table type
    Types include: "TABLE", "VIEW", "SYSTEM TABLE", "SYSTEM PSEUDO TABLE"
Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
[in]schemaPatterna schema name pattern - must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]tableNamePatterna table name pattern - must match the table name as it is stored in the database
[in]typeCountthe number of elements in the types list
[in]typesa list of table types to include; these types must be from the list of table types returned from getTableTypes(); null returns all types
Returns
ResultSet with each row representing a matching table. The caller must free with NuoDB_ResultSet_free().

◆ getTableTypes

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getTableTypes) (NuoDB_DatabaseMetaData *_this)

Retrieves the table types available in this database.

The results are ordered by table type.

The columns include:

  1. TABLE_TYPE const char* => table type. NuoDB supports the following table types:
    • SYSTEM PSEUDO TABLE
    • SYSTEM TABLE
    • TABLE
    • VIEW
Returns
ResultSet with each row representing a table type.

◆ getTriggers

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getTriggers) (NuoDB_DatabaseMetaData *_this, const char *schemaPattern, const char *tableNamePattern, const char *triggerNamePattern)

Retrieves a description of the triggers stored in the database.

Results are ordered by TABLE_SCHEM, TABLE_NAME and TRIGGER_NAME.

Each trigger description has the the following columns:

  1. TABLE_CAT const char* => table catalog (always "" in NuoDB)
  2. TABLE_SCHEM const char* => table schema (may be null)
  3. TABLE_NAME const char* => table name
  4. TRIGGER_NAME const char* => trigger name
  5. CLASS_NAME const char* => for Java triggers, the classid specified in the CREATE TRIGGER command.
  6. METHOD_NAME const char* => for Java triggers, the fully qualified name of the method to be invoked by the trigger.
  7. POSITION short => A user-provided index that defines the order of invocations of triggers (lower value means early execution). This corresponds to the POSITION number argument for CREATE TRIGGER
  8. TYPE_MASK int => Defines the trigger event:
    • 1 = Before Insert
    • 2 = After Insert
    • 4 = Before Update
    • 8 = After Update
    • 16 = Before Delete
    • 32 = After Delete
    • 64 = Before Commit - reserved for future use
    • 128 = After Commit - reserved for future use
  9. ACTIVE short => Defined as: 1=Active, 0=Inactive
Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
[in]schemaPatterna schema name pattern - must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
[in]tableNamePatterna table name pattern - must match the table name as it is stored in the database
[in]triggerNamePatterna trigger name pattern - must match the trigger name as it is stored in the database
Returns
ResultSet with each row representing a trigger

◆ getTypeInfo

NuoDB_ResultSet *(* NuoDB_DatabaseMetaData::getTypeInfo) (NuoDB_DatabaseMetaData *_this)

Retrieves a description of all the data types supported NuoDB.

They are ordered by DATA_TYPE and then by how closely the data type maps to the corresponding JDBC SQL type.

Each type description has the following columns:

  1. TYPE_NAME const char* => Type name
  2. DATA_TYPE int => the type code defined by NuoDB::SqlType
  3. PRECISION int => maximum precision
  4. LITERAL_PREFIX const char* => prefix used to quote a literal (may be null)
  5. LITERAL_SUFFIX const char* => suffix used to quote a literal (may be null)
  6. CREATE_PARAMS const char* => parameters used in creating the type (may be null)
  7. NULLABLE short => can you use NULL for this type. Values are:
    • NUODB_NULLABLE_NONULLS (0) - does not allow NULL values
    • NUODB_NULLABLE_NULLABLE (1) - allows NULL values
    • NUODB_NULLABLE_UNKNOWN (2)- nullability unknown
  8. CASE_SENSITIVE boolean=> is it case sensitive.
  9. SEARCHABLE short => can you use "WHERE" based on this type. Values are:
    • NUODB_TYPE_PREDNONE (0) - No support
    • NUODB_TYPE_PREDCHAR (1) - Only supported with WHERE .. LIKE
    • NUODB_TYPE_PREDBASIC (2) - Supported except for WHERE .. LIKE
    • NUODB_TYPE_SEARCHABLE (3) - Supported for all WHERE ..
  10. UNSIGNED_ATTRIBUTE boolean => is it unsigned.
  11. FIXED_PREC_SCALE boolean => can it be a money value.
  12. AUTO_INCREMENT boolean => can it be used for an auto-increment value.
  13. LOCAL_TYPE_NAME const char* => localized version of type name (may be null)
  14. MINIMUM_SCALE short => minimum scale supported
  15. MAXIMUM_SCALE short => maximum scale supported
  16. SQL_DATA_TYPE int => unused
  17. SQL_DATETIME_SUB int => unused
  18. NUM_PREC_RADIX int => always 10 for NuoDB
Returns
a ResultSet object in which each row is an SQL type description

◆ supportsTransactionIsolationLevel

nuodb_bool_t(* NuoDB_DatabaseMetaData::supportsTransactionIsolationLevel) (NuoDB_DatabaseMetaData *_this, NuoDB_TransactionIsolationLevel level)

Checks whether NuoDB supports the given transaction isolation level.

This method returns true if the isolation level is supported by the database, and false otherwise. See Supported Transaction Isolation Levels for more information.

Parameters
[in]_thisa pointer to the current (this) NuoDB_DatabaseMetaData data structure.
[in]levelone of the transaction isolation levels in NuoDB_TransactionIsolationLevel.
Returns
true if the isolation level is supported and false otherwise.

The documentation for this struct was generated from the following file: