📄 tinysqldatabasemetadata.java
字号:
* <LI> procedureNoNulls - does not allow NULL values
* <LI> procedureNullable - allows NULL values
* <LI> procedureNullableUnknown - nullability unknown
* </UL>
* <LI><B>REMARKS</B> String => comment describing parameter/column
* </OL>
*
* <P><B>Note:</B> Some databases may not return the column
* descriptions for a procedure. Additional columns beyond
* REMARKS can be defined by the database.
*
* @param catalog a catalog name; "" retrieves those without a
* catalog; null means drop catalog name from the selection criteria
* @param schemaPattern a schema name pattern; "" retrieves those
* without a schema
* @param procedureNamePattern a procedure name pattern
* @param columnNamePattern a column name pattern
* @return ResultSet - each row describes a stored procedure parameter or
* column
* @exception SQLException if a database access error occurs
* @see #getSearchStringEscape
*/
public ResultSet getProcedureColumns(String catalog,
String schemaPattern,
String procedureNamePattern,
String columnNamePattern) {
return null;
}
/**
* Indicates that type of the column is unknown.
* A possible value for the column
* <code>COLUMN_TYPE</code>
* in the <code>ResultSet</code>
* returned by the method <code>getProcedureColumns</code>.
*/
int procedureColumnUnknown = 0;
/**
* Indicates that the column stores IN parameters.
* A possible value for the column
* <code>COLUMN_TYPE</code>
* in the <code>ResultSet</code>
* returned by the method <code>getProcedureColumns</code>.
*/
int procedureColumnIn = 1;
/**
* Indicates that the column stores INOUT parameters.
* A possible value for the column
* <code>COLUMN_TYPE</code>
* in the <code>ResultSet</code>
* returned by the method <code>getProcedureColumns</code>.
*/
int procedureColumnInOut = 2;
/**
* Indicates that the column stores OUT parameters.
* A possible value for the column
* <code>COLUMN_TYPE</code>
* in the <code>ResultSet</code>
* returned by the method <code>getProcedureColumns</code>.
*/
int procedureColumnOut = 4;
/**
* Indicates that the column stores return values.
* A possible value for the column
* <code>COLUMN_TYPE</code>
* in the <code>ResultSet</code>
* returned by the method <code>getProcedureColumns</code>.
*/
int procedureColumnReturn = 5;
/**
* Indicates that the column stores results.
* A possible value for the column
* <code>COLUMN_TYPE</code>
* in the <code>ResultSet</code>
* returned by the method <code>getProcedureColumns</code>.
*/
int procedureColumnResult = 3;
/**
* Indicates that <code>NULL</code> values are not allowed.
* A possible value for the column
* <code>NULLABLE</code>
* in the <code>ResultSet</code>
* returned by the method <code>getProcedureColumns</code>.
*/
int procedureNoNulls = 0;
/**
* Indicates that <code>NULL</code> values are allowed.
* A possible value for the column
* <code>NULLABLE</code>
* in the <code>ResultSet</code>
* returned by the method <code>getProcedureColumns</code>.
*/
int procedureNullable = 1;
/**
* Indicates that whether <code>NULL</code> values are allowed
* is unknown.
* A possible value for the column
* <code>NULLABLE</code>
* in the <code>ResultSet</code>
* returned by the method <code>getProcedureColumns</code>.
*/
int procedureNullableUnknown = 2;
/**
* Gets a description of tables available in a catalog.
*
* <P>Only table descriptions matching the catalog, schema, table
* name and type criteria are returned. They are ordered by
* TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.
*
* <P>Each table description has the following columns:
* <OL>
* <LI><B>TABLE_CAT</B> String => table catalog (may be null)
* <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
* <LI><B>TABLE_NAME</B> String => table name
* <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE",
* "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
* "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
* <LI><B>REMARKS</B> String => explanatory comment on the table
* </OL>
*
* <P><B>Note:</B> Some databases may not return information for
* all tables.
*
* @param catalog a catalog name; "" retrieves those without a
* catalog; null means drop catalog name from the selection criteria
* @param schemaPattern a schema name pattern; "" retrieves those
* without a schema
* @param tableNamePattern a table name pattern
* @param types a list of table types to include; null returns all types
* @return ResultSet - each row is a table description
* @exception SQLException if a database access error occurs
* @see #getSearchStringEscape
*/
public ResultSet getTables(String catalog, String schemaPattern,
String tableNamePattern, String types[]) {
return null; // !!!
}
/**
* Gets the schema names available in this database. The results
* are ordered by schema name.
*
* <P>The schema column is:
* <OL>
* <LI><B>TABLE_SCHEM</B> String => schema name
* </OL>
*
* @return ResultSet - each row has a single String column that is a
* schema name
* @exception SQLException if a database access error occurs
*/
public ResultSet getSchemas() throws SQLException {
throw new SQLException("tinySQL does not support schemas.");
}
/**
* Gets the catalog names available in this database. The results
* are ordered by catalog name.
*
* <P>The catalog column is:
* <OL>
* <LI><B>TABLE_CAT</B> String => catalog name
* </OL>
*
* @return ResultSet - each row has a single String column that is a
* catalog name
* @exception SQLException if a database access error occurs
*/
public ResultSet getCatalogs() throws SQLException {
throw new SQLException("tinySQL does not support catalogues.");
}
/**
* Gets the table types available in this database. The results
* are ordered by table type.
*
* <P>The table type is:
* <OL>
* <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE",
* "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
* "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
* </OL>
*
* @return ResultSet - each row has a single String column that is a
* table type
* @exception SQLException if a database access error occurs
*/
public ResultSet getTableTypes() {
return null; // !!!
}
/**
* Gets a description of table columns available in
* the specified catalog.
*
* <P>Only column descriptions matching the catalog, schema, table
* and column name criteria are returned. They are ordered by
* TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION.
*
* <P>Each column description has the following columns:
* <OL>
* <LI><B>TABLE_CAT</B> String => table catalog (may be null)
* <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
* <LI><B>TABLE_NAME</B> String => table name
* <LI><B>COLUMN_NAME</B> String => column name
* <LI><B>DATA_TYPE</B> short => SQL type from java.sql.Types
* <LI><B>TYPE_NAME</B> String => Data source dependent type name,
* for a UDT the type name is fully qualified
* <LI><B>COLUMN_SIZE</B> int => column size. For char or date
* types this is the maximum number of characters, for numeric or
* decimal types this is precision.
* <LI><B>BUFFER_LENGTH</B> is not used.
* <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits
* <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
* <LI><B>NULLABLE</B> int => is NULL allowed?
* <UL>
* <LI> columnNoNulls - might not allow NULL values
* <LI> columnNullable - definitely allows NULL values
* <LI> columnNullableUnknown - nullability unknown
* </UL>
* <LI><B>REMARKS</B> String => comment describing column (may be null)
* <LI><B>COLUMN_DEF</B> String => default value (may be null)
* <LI><B>SQL_DATA_TYPE</B> int => unused
* <LI><B>SQL_DATETIME_SUB</B> int => unused
* <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the
* maximum number of bytes in the column
* <LI><B>ORDINAL_POSITION</B> int => index of column in table
* (starting at 1)
* <LI><B>IS_NULLABLE</B> String => "NO" means column definitely
* does not allow NULL values; "YES" means the column might
* allow NULL values. An empty string means nobody knows.
* </OL>
*
* @param catalog a catalog name; "" retrieves those without a
* catalog; null means drop catalog name from the selection criteria
* @param schemaPattern a schema name pattern; "" retrieves those
* without a schema
* @param tableNamePattern a table name pattern
* @param columnNamePattern a column name pattern
* @return ResultSet - each row is a column description
* @exception SQLException if a database access error occurs
* @see #getSearchStringEscape
*/
public ResultSet getColumns(String catalog, String schemaPattern,
String tableNamePattern, String columnNamePattern) {
Utils.log("tinySQL does not support getColumns().");
return null;
}
/**
* Indicates that the column might not allow NULL values.
* A possible value for the column
* <code>NULLABLE</code>
* in the <code>ResultSet</code> returned by the method
* <code>getColumns</code>.
*/
int columnNoNulls = 0;
/**
* Indicates that the column definitely allows <code>NULL</code> values.
* A possible value for the column
* <code>NULLABLE</code>
* in the <code>ResultSet</code> returned by the method
* <code>getColumns</code>.
*/
int columnNullable = 1;
/**
* Indicates that the nullability of columns is unknown.
* A possible value for the column
* <code>NULLABLE</code>
* in the <code>ResultSet</code> returned by the method
* <code>getColumns</code>.
*/
int columnNullableUnknown = 2;
/**
* Gets a description of the access rights for a table's columns.
*
* <P>Only privileges matching the column name criteria are
* returned. They are ordered by COLUMN_NAME and PRIVILEGE.
*
* <P>Each privilige description has the following columns:
* <OL>
* <LI><B>TABLE_CAT</B> String => table catalog (may be null)
* <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
* <LI><B>TABLE_NAME</B> String => table name
* <LI><B>COLUMN_NAME</B> String => column name
* <LI><B>GRANTOR</B> => grantor of access (may be null)
* <LI><B>GRANTEE</B> String => grantee of access
* <LI><B>PRIVILEGE</B> String => name of access (SELECT,
* INSERT, UPDATE, REFRENCES, ...)
* <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted
* to grant to others; "NO" if not; null if unknown
* </OL>
*
* @param catalog a catalog name; "" retrieves those without a
* catalog; null means drop catalog name from the selection criteria
* @param schema a schema name; "" retrieves those without a schema
* @param table a table name
* @param columnNamePattern a column name pattern
* @return ResultSet - each row is a column privilege description
* @exception SQLException if a database access error occurs
* @see #getSearchStringEscape
*/
public ResultSet getColumnPrivileges(String catalog, String schema,
String table, String columnNamePattern) throws SQLException {
throw new SQLException("tinySQL does not support column privileges.");
}
/**
* Gets a description of the access rights for each table available
* in a catalog. Note that a table privilege applies to one or
* more columns in the table. It would be wrong to assume that
* this priviledge applies to all columns (this may be true for
* some systems but is not true for all.)
*
* <P>Only privileges matching the schema and table name
* criteria are returned. They are ordered by TABLE_SCHEM,
* TABLE_NAME, and PRIVILEGE.
*
* <P>Each privilige description has the following columns:
* <OL>
* <LI><B>TABLE_CAT</B> String => table catalog (may be null)
* <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
* <LI><B>TABLE_NAME</B> String => table name
* <LI><B>GRANTOR</B> => grantor of access (may be null)
* <LI><B>GRANTEE</B> String => grantee of access
* <LI><B>PRIVILEGE</B> String => name of access (SELECT,
* INSERT, UPDATE, REFRENCES, ...)
* <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted
* to grant to others; "NO" if not; null if unknown
* </OL>
*
* @param catalog a catalog name; "" retrieves those without a
* catalog; null means drop catalog name from the selection criteria
* @param schemaPattern a schema name pattern; "" retrieves those
* without a schema
* @param tableNamePattern a table name pattern
* @return ResultSet - each row is a table privilege description
* @exception SQLException if a database access error occurs
* @see #getSearchStringEscape
*/
public ResultSet getTablePrivileges(String catalog, String schemaPattern,
String tableNamePattern) throws SQLException {
throw new SQLException("tinySQL does not support table privileges.");
}
/**
* Gets a description of a table's optimal set of columns that
* uniquely identifies a row. They are ordered by SCOPE.
*
* <P>Each column description has the following columns:
* <OL>
* <LI><B>SCOPE</B> short => actual scope of result
* <UL>
* <LI> bestRowTemporary - very temporary, while using row
* <LI> bestRowTransaction - valid for remainder of current transaction
* <LI> bestRowSession - valid for remainder of current session
* </UL>
* <LI><B>COLUMN_NAME</B> String => column name
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -