|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sas.rio.MVADatabaseMetaData | +--com.sas.rio.LDAPDatabaseMetaData
This class extends the MVADatabaseMetaData class. The metadata information related to the database (like schema/table/column) is accessed from an LDAP directory structure. Rest of the DatabaseMetaData information is simply inherited from the original MVADatabaseMetaData class. Not all information is available from LDAP. If you compare the LDAPDatabaseMetaData implementation with the MVADatabaseMetaData object, the only difference is access of dictionary tables. LDAP replaces dictionary funtions. So, instead of querying the dictionary tables LDAPDatabaseMetaData looks in LDAP.
Many of the methods here return lists of information in ResultSets. You can use the normal ResultSet methods such as getString and getInt to retrieve the data from these ResultSets. If a given form of metadata is not available, these methods should throw a SQLException.
Some of these methods take arguments that are String patterns. These arguments all have names such as fooPattern. Within a pattern String, "%" means match any substring of 0 or more characters, and "_" means match any one character. Only metadata entries matching the search pattern are returned. If a search pattern argument is set to a null ref, it means that argument's criteria should be dropped from the search.
A SQLException will be thrown if a driver does not support a meta data method. In the case of methods that return a ResultSet, either a ResultSet (which may be empty) is returned or a SQLException is thrown.
Field Summary | |
static java.lang.String |
INITCTX
|
Fields inherited from class com.sas.rio.MVADatabaseMetaData |
bookmarkLength,
bookmarkLengthHolder,
sasDataSet,
status |
Constructor Summary | |
LDAPDatabaseMetaData(MVAConnection connection,
java.util.Properties info)
Constructs LDAPDatabaseMetaData object. |
Method Summary | |
java.sql.ResultSet |
getColumns(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String tableNamePattern,
java.lang.String columnNamePattern)
Gets a description of table columns available in LDAP. |
java.sql.ResultSet |
getSchemas()
Gets the schema names available in LDAP. |
java.sql.ResultSet |
getTables(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String tableNamePattern,
java.lang.String[] types)
Gets a description of the tables that are defined in LDAP. |
java.sql.ResultSet |
getTableTypes()
Gets the table types available in LDAP. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String INITCTX
Constructor Detail |
public LDAPDatabaseMetaData(MVAConnection connection, java.util.Properties info) throws java.sql.SQLException
connection
- MVAConnection object.info
- Properties object containing LDAP information.Method Detail |
public java.sql.ResultSet getTableTypes() throws java.sql.SQLException
The table type is:
Column name | Data type | Description |
---|---|---|
TYPE | String | The table type |
public java.sql.ResultSet getTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String[] types) throws java.sql.SQLException
Only table descriptions that match the catalog, schema, table name, and type criteria are returned. The rows are ordered by TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.
Each table description contains the following columns:
Column name | Data type | Description |
---|---|---|
CATALOG | String | The table catalog (can be NULL) |
SCHEMA | String | The table schema (can be NULL) |
TABLE | String | The table name |
TYPE | String | The table type |
COMMENT | String | The tabledn |
TABLE_PASS | String | A non-standard column returning the password protection of the table. The returned column values would be one of NULL, READ, WRITE, ALTER values. A NULL is returned if no passwords are defined for the table. Since this is a non-standard result, this column must be referenced by name. |
catalog
- A catalog name. An empty string ("") retrieves the rows that do not have a catalog.schemaPattern
- A schema name pattern. An empty string ("") retrieves the rows that do not
have a schema.tableNamePattern
- A table name pattern.types
- A list of table types to include. A value of NULL returns all types.public java.sql.ResultSet getSchemas() throws java.sql.SQLException
Each row of the result set contains the following columns:
Column name | Data type | Description |
---|---|---|
SCHEMA | String | The schema name |
public java.sql.ResultSet getColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String columnNamePattern) throws java.sql.SQLException
Only column descriptions matching the catalog, schema, table and column name criteria are returned. The descriptions are ordered by TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION.
Each column description contains the following columns:
Column name | Data type | Description |
---|---|---|
CATALOG | String | A table catalog (can be NULL) |
SCHEMA | String | A table schema (can be NULL) |
TABLE | String | A table name |
NAME | String | A column name |
SQLTYPE | short | An SQL type from java.sql.Types |
TYPE | String | A data-source-dependent format name including format width and decimal |
SIZE | int | The column size (For char or date types, this is the maximum number of characters; for numeric or decimal types, this is precision.) |
EMPTY | NULL | Not used |
SCALE | int | The number of fractional digits |
RADIX | int | The radix (typically either 10 or 2) |
NULLABLE | int | Constants that state whether NULL is allowed:
|
COMMENT | String | The columndn |
DEFAULT | String | The default value (can be NULL) |
EMPTY2 | int | Not used |
EMPTY3 | int | Not used |
MAX | int | For char types, this is the maximum number of bytes in the column |
POSITION | int | The index of the column in the table (starting at 1) |
NOTKNOWN | String | Strings that state whether NULL is allowed:
|
catalog
- A catalog name. An empty string ("") retrieves the rows that do
not have a catalog.schemaPattern
- A schema name pattern. An empty string ("") retrieves the
rows that do not have a schema.tableNamePattern
- A table name pattern. For password protected tables the parameter will be
of the form myTable(pw=XXXX).columnNamePattern
- A column name pattern.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |