9. Understanding .NET Data Provider Connectivity : .NET Data Provider Classes : IngresConnection Class : IngresConnection.GetSchema Method
 
Share this page                  
IngresConnection.GetSchema Method
The IngresConnection.GetSchema method is used to return information on the schema of a database. The collection of metadata returned describes the tables, columns, and so on, that are defined in the database. The schema information is returned in the form of a .NET Framework DataTable.
GetSchema takes zero or more parameters. The first parameter is the collection name (for example: "Tables" or "Columns"). Optional restriction parameters in a String array ("restrictionValues") allow the returned metadata to be filtered to only those rows for a specified value, for example, only those columns for a specific table name. If GetSchema is invoked with no parameters or with a collection name of "MetaDataCollections" then a DataTable is returned that lists the collection names. Each row in the DataTable lists the collection name and number of restrictions supported for that collection.
The following collections are supported:
MetaDataCollection
Column Name
Data Type
Description
CollectionName
String
Collection name support by the data provider
NumberOfRestrictions
INT32
Number of restrictions that can be specified for the collection by GetSchema
NumberOfIdentifierParts
INT32
Number of parts in the database object name.
DataSourceInformation
Column Name
Data Type
Description
CompositeIdentifierSeparatorPattern
String
Regular expression for matching composite name separator character
DataSourceProductName
String
Product name accessed by the data provider
DataSourceProductVersion
String
Product version accessed by the data provider
DataSourceProductVersionNormalized
String
Product version accessed by the data provider in a format that will be consistent for all versions of the data provider
GroupByBehavior
GroupByBehavior
The relationship between GROUP BY columns and non-aggregated columns of the SELECT statement
IdentifierPattern
String
Regular expression for matching an identifier
IdentifierCase
IdentifierCase
Indicates if nonquoted identifiers are case-sensitive
OrderByColumnsInSelect
Boolean
Specifies whether ORDER BY columns must be specified in the SELECT list.
ParameterMarkerFormat
String
Format string for matching a parameter marker
ParameterMarkerPattern
String
Regular expression for matching a parameter marker
ParameterNameMaxLength
INT32
Maximum character length of a named parameter
ParameterNamePattern
String
Regular expression for matching a named parameter
QuotedIdentifierPattern
String
Regular expression for matching a quoted identifier
QuotedIdentifierCase
String
Indicats if quoted identifiers are case sensitive
StatementSeparatorPattern
String
Regular expression for matching a statement separator
StringLiteralPattern
String
Regular expression for matching a quoted string literal in an SQL statement
SupportedJoinOperators
SupportedJoinOperators
Specifies what SQL JOIN operators are supported
DataTypes
ColumnName
DataType
Description
TypeName
String
Ingres data type name
ProviderDbType
INT32
IngresType value to be used for a parameter data type
ColumnSize
INT64
Length of the data type, if non-numeric
CreateFormat
String
Format string for creation of a column’s data type in a CREATE TABLE
CreateParameters
String
Length, precision, and/or scale parameters associated with the data type’s CreateFormat
DataType
String
Name of the .NET Framework data type associated with this data type
IsAutoIncrementable
Boolean
Indicates whether this data type may be auto-incrementing
IsBestMatch
Boolean
Indicates whether this data type is the best match for the .NET Framework specified by the DataType column
IsCaseSensitive
Boolean
Indicates whether the data type is a character data type and is case-sensitive
IsFixedLength
Boolean
Indicates whether the data type is of fixed length
IsFixedPrecisionScale
Boolean
Indicates whether the data type has a fixed precision and scale
IsLong
Boolean
Indicates whether the data type is a CLOB or BLOB
IsNullable
Boolean
Indicates whether the data type is nullable
IsSearchable
Boolean
Indicates whether the data type can be used in a WHERE predicate with any operator other than LIKE
IsSearchableWithLike
Boolean
Indicates whether the data type can be used in a WHERE predicate with the LIKE operator
IsUnsigned
Boolean
Indicates whether the data type is unsigned
MaximumScale
INT16
If the data type is numeric, the maximum number of digits to the right of the decimal point
MinimumScale
INT16
If the data type is numeric, the minimum number of digits to the right of the decimal point
IsConcurrencyType
Boolean
Indicates whether the data type is updated when the row is changed and the column value is different. DBNull.Value if this capability is not supported.
IsLiteralSupported
Boolean
Indicates whether the data type can be expressed in a literal
LiteralPrefix
String
The prefix for a literal of this type
LiteralSuffix
String
The suffix for a literal of this type
Restrictions
ColumnName
DataType
Description
CollectionName
String
Collection name
RestrictionName
String
Restriction name
RestrictionDefault
String
Ignored
RestrictionNumber
INT32
The location (numbered from 1) within the restrictions collection where this restriction is associated with
ReservedWords
ColumnName
DataType
Description
ReservedWord
String
Ingres specific reserved words
Tables
ColumnName
DataType
Description
TABLE_CATALOG1
String
Always DBNull.Value
TABLE_SCHEMA2
String
Schema name (table owner name)
TABLE_NAME3
String
Table name of user table
TABLE_TYPE
String
Always "TABLE"
Views
ColumnName
DataType
Description
TABLE_CATALOG1
String
Always DBNull.Value
TABLE_SCHEMA 2
String
Schema name (view owner name)
TABLE_NAME3
String
View name of user view
TABLE_TYPE
String
Always "VIEW"
Columns
ColumnName
DataType
Description
TABLE_CATALOG1
String
Always DBNull.Value
TABLE_SCHEMA2
String
Schema name (table/view owner name)
TABLE_NAME3
String
Table/view name of user table
COLUMN_NAME4
String
Column name
ORDINAL_POSITION
Int16
Position of the column within the set of the table’s columns, numbered from 1
COLUMN_DEFAULT
String
Column’s default value
IS_NULLABLE
Boolean
Indicates whether the column is nullable
DATA_TYPE
String
Ingres data type name
CHARACTER_MAXIMUM
_LENGTH
INT32
Maximum length in characters, if character or binary data type
CHARACTER_OCTET
_LENGTH
INT32
Maximum length in bytes, if character or binary data type
NUMERIC_PRECISION
Byte
Precision length if an integer, float, real, decimal, datetime, or interval data type
NUMERIC_PRECISION
_RADIX
INT16
Radix of the Precision
NUMERIC_SCALE
INT32
Scale length
DATETIME_PRECISION
INT16
Precision of ingresdate and ANSI Timestamp data types
Indexes
ColumnName
DataType
Description
TABLE_CATALOG1
String
Always DBNull.Value
TABLE_SCHEMA2
String
Base table schema name
(table owner name)
TABLE_NAME3
String
Base table name
NON_UNIQUE
INT16
1 if index is unique, else 0
INDEX_QUALIFIER
String
Index owner name
INDEX_NAME4
String
Index name
TYPE
INT16
Index type (always ODBC index type SQL_INDEX_OTHER)
ORDINAL_POSITION
INT16
Position of the column within the set of the index’s columns, numbered from 1
COLUMN_NAME
String
Column name
ASC_OR_DSC
String
Collation. "A" for ascending, "D" for descending
Procedures
ColumnName
DataType
Description
PROCEDURE_CATALOG1
String
Always DBNull.Value
PROCEDURE_SCHEMA2
String
Procedure schema (procedure owner name)
PROCEDURE_NAME3
String
Procedure name
ProcedureParameters
ColumnName
DataType
Description
PROCEDURE_CATALOG1
String
Always DBNull.Value
PROCEDURE _SCHEMA2
String
Schema name
(procedure owner name)
PROCEDURE _NAME3
String
Procedure name
COLUMN_NAME4
String
Procedure parameter name
ORDINAL_POSITION
INT16
Position of the column within the set of the procedure’s parameters, numbered from 1
COLUMN_DEFAULT
String
Parameter’s default value
IS_NULLABLE
Boolean
Indicates whether the parameter is nullable
DATA_TYPE
String
Ingres data type name
CHARACTER_MAXIMUM
_LENGTH
INT32
Maximum length in characters, if character or binary data type
CHARACTER_OCTET
_LENGTH
INT32
Maximum length in bytes, if character or binary data type
NUMERIC_PRECISION
Byte
Precision length if an integer, float, real, decimal, datetime, or interval data type
NUMERIC_PRECISION
_RADIX
INT16
Radix of the precision
NUMERIC_SCALE
INT32
Scale length
DATETIME_PRECISION
INT16
Precision of ingresdate and ANSI Timestamp data types
INGRESTYPE
IngresType
.NET Data Provider data type
1. Can be used as a restriction in the first entry of restrictionValues array.
2. Can be used as a restriction in the second entry of restrictionValues array.
3. Can be used as a restriction in the third entry of restrictionValues array.
4. Can be used as a restriction in the fourth entry of restrictionValues array.