Class JdbcMetadataInfo
- java.lang.Object
-
- org.apache.ignite.internal.processors.odbc.jdbc.JdbcMetadataInfo
-
public class JdbcMetadataInfo extends Object
Facade overGridKernalContextto get information about database entities in terms of JDBC.
-
-
Constructor Summary
Constructors Constructor Description JdbcMetadataInfo(GridKernalContext ctx)Initializes info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<JdbcColumnMeta>getColumnsMeta(@Nullable ClientListenerProtocolVersion protoVer, String schemaNamePtrn, String tblNamePtrn, String colNamePtrn)SeeDatabaseMetaData.getColumns(String, String, String, String)for details.SortedSet<JdbcIndexMeta>getIndexesMeta(String schemaNamePtrn, String tblNamePtrn)Collection<JdbcPrimaryKeyMeta>getPrimaryKeys(String schemaNamePtrn, String tblNamePtrn)SeeDatabaseMetaData.getPrimaryKeys(String, String, String)for details.SortedSet<String>getSchemasMeta(String schemaNamePtrn)SeeDatabaseMetaData.getSchemas(String, String)for details.List<JdbcTableMeta>getTablesMeta(String schemaNamePtrn, String tblNamePtrn, String[] tblTypes)SeeDatabaseMetaData.getTables(String, String, String, String[])for details.
-
-
-
Constructor Detail
-
JdbcMetadataInfo
public JdbcMetadataInfo(GridKernalContext ctx)
Initializes info.- Parameters:
ctx- GridKernalContext
-
-
Method Detail
-
getPrimaryKeys
public Collection<JdbcPrimaryKeyMeta> getPrimaryKeys(String schemaNamePtrn, String tblNamePtrn)
SeeDatabaseMetaData.getPrimaryKeys(String, String, String)for details. Ignite has only one possible CATALOG_NAME, it is handled on the client (driver) side.- Returns:
- Collection of primary keys information for tables that matches specified schema and table name patterns.
-
getTablesMeta
public List<JdbcTableMeta> getTablesMeta(String schemaNamePtrn, String tblNamePtrn, String[] tblTypes)
SeeDatabaseMetaData.getTables(String, String, String, String[])for details. Ignite has only one possible value for CATALOG_NAME and has only one table type so these parameters are handled on the client (driver) side. Result is ordered by (schema name, table name).- Parameters:
schemaNamePtrn- sql pattern for schema name.tblNamePtrn- sql pattern for table name.tblTypes- Requested table types.- Returns:
- List of metadatas of tables that matches.
-
getColumnsMeta
public Collection<JdbcColumnMeta> getColumnsMeta(@Nullable @Nullable ClientListenerProtocolVersion protoVer, String schemaNamePtrn, String tblNamePtrn, String colNamePtrn)
SeeDatabaseMetaData.getColumns(String, String, String, String)for details. Ignite has only one possible CATALOG_NAME, it is handled on the client (driver) side.- Parameters:
protoVer- for what version of protocol to generate metadata. Early versions of protocol don't support some features like default values or precision/scale. Ifnull, current version will be used.- Returns:
- List of metadatas about columns that match specified schema/tablename/columnname criterias.
-
getSchemasMeta
public SortedSet<String> getSchemasMeta(String schemaNamePtrn)
SeeDatabaseMetaData.getSchemas(String, String)for details. Ignite has only one possible CATALOG_NAME, it is handled on the client (driver) side.- Parameters:
schemaNamePtrn- sql pattern for schema name filter.- Returns:
- schema names that matches provided pattern.
-
getIndexesMeta
public SortedSet<JdbcIndexMeta> getIndexesMeta(String schemaNamePtrn, String tblNamePtrn)
- Returns:
- Sorted index metadata collection, filtered according to specified criterias.
-
-