public class ResultSetMetaData extends Object implements ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown| Constructor and Description |
|---|
ResultSetMetaData(ExceptionFactory exceptionFactory,
ColumnDefinitionPacket[] fieldPackets,
Configuration conf,
boolean forceAlias)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCatalogName(int column)
Get the designated column's table's schema.
|
String |
getColumnClassName(int column)
Returns the fully-qualified name of the Java class whose instances are manufactured if the
method
ResultSet.getObject is called to retrieve a value from the column. |
int |
getColumnCount()
Returns the number of columns in this
ResultSet object. |
int |
getColumnDisplaySize(int column)
Indicates the designated column's normal maximum width in characters.
|
String |
getColumnLabel(int column)
Gets the designated column's suggested title for use in printouts and displays.
|
String |
getColumnName(int idx)
Get the designated column's name.
|
int |
getColumnType(int column)
Retrieves the designated column's SQL type.
|
String |
getColumnTypeName(int index)
Retrieves the designated column's database-specific type name.
|
int |
getPrecision(int column)
Get the designated column's specified column size.
|
int |
getScale(int index)
Gets the designated column's number of digits to right of the decimal point.
|
String |
getSchemaName(int column) |
String |
getTableName(int column)
Gets the designated column's table name.
|
boolean |
isAutoIncrement(int column)
Indicates whether the designated column is automatically numbered.
|
boolean |
isCaseSensitive(int column)
Indicates whether a column's case matters.
|
boolean |
isCurrency(int column)
Indicates whether the designated column is a cash value.
|
boolean |
isDefinitelyWritable(int column)
Indicates whether a write on the designated column will definitely succeed.
|
int |
isNullable(int column)
Indicates the nullability of values in the designated column.
|
boolean |
isReadOnly(int column)
Indicates whether the designated column is definitely not writable.
|
boolean |
isSearchable(int column)
Indicates whether the designated column can be used in a where clause.
|
boolean |
isSigned(int column)
Indicates whether values in the designated column are signed numbers.
|
boolean |
isWrapperFor(Class<?> iface)
Returns true if this either implements the interface argument or is directly or indirectly a
wrapper for an object that does.
|
boolean |
isWritable(int column)
Indicates whether it is possible for a write on the designated column to succeed.
|
<T> T |
unwrap(Class<T> iface)
Returns an object that implements the given interface to allow access to non-standard methods,
or standard methods not exposed by the proxy.
|
public ResultSetMetaData(ExceptionFactory exceptionFactory, ColumnDefinitionPacket[] fieldPackets, Configuration conf, boolean forceAlias)
exceptionFactory - default exception handlerfieldPackets - column informationsconf - connection optionsforceAlias - force table and column name alias as original datapublic int getColumnCount()
ResultSet object.getColumnCount in interface ResultSetMetaDatapublic boolean isAutoIncrement(int column)
throws SQLException
isAutoIncrement in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...true if so; false otherwiseSQLException - if a database access error occurspublic boolean isCaseSensitive(int column)
isCaseSensitive in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...true if so; false otherwisepublic boolean isSearchable(int column)
isSearchable in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...true if so; false otherwisepublic boolean isCurrency(int column)
isCurrency in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...true if so; false otherwisepublic int isNullable(int column)
throws SQLException
isNullable in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...columnNoNulls,
columnNullable or columnNullableUnknownSQLException - if a database access error occurspublic boolean isSigned(int column)
throws SQLException
isSigned in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...true if so; false otherwiseSQLException - if a database access error occurspublic int getColumnDisplaySize(int column)
throws SQLException
getColumnDisplaySize in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...SQLException - if a database access error occurspublic String getColumnLabel(int column) throws SQLException
AS clause. If a SQL AS is not
specified, the value returned from getColumnLabel will be the same as the value
returned by the getColumnName method.getColumnLabel in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...SQLException - if a database access error occurspublic String getColumnName(int idx) throws SQLException
getColumnName in interface ResultSetMetaDataidx - the first column is 1, the second is 2, ...SQLException - if a database access error occurspublic String getCatalogName(int column) throws SQLException
getCatalogName in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...SQLException - if a database access error occurspublic int getPrecision(int column)
throws SQLException
getPrecision in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...SQLException - if a database access error occurspublic int getScale(int index)
throws SQLException
getScale in interface ResultSetMetaDataindex - the first column is 1, the second is 2, ...SQLException - if a database access error occurspublic String getTableName(int column) throws SQLException
getTableName in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...SQLException - if a database access error occurspublic String getSchemaName(int column)
getSchemaName in interface ResultSetMetaDatapublic int getColumnType(int column)
throws SQLException
getColumnType in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...SQLException - if a database access error occursTypespublic String getColumnTypeName(int index) throws SQLException
getColumnTypeName in interface ResultSetMetaDataindex - the first column is 1, the second is 2, ...SQLException - if a database access error occurspublic boolean isReadOnly(int column)
throws SQLException
isReadOnly in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...true if so; false otherwiseSQLException - if a database access error occurs or in case of wrong indexpublic boolean isWritable(int column)
throws SQLException
isWritable in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...true if so; false otherwiseSQLException - if a database access error occurs or in case of wrong indexpublic boolean isDefinitelyWritable(int column)
throws SQLException
isDefinitelyWritable in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...true if so; false otherwiseSQLException - if a database access error occurs or in case of wrong indexpublic String getColumnClassName(int column) throws SQLException
ResultSet.getObject is called to retrieve a value from the column.
ResultSet.getObject may return a subclass of the class returned by this method.getColumnClassName in interface ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...ResultSet.getObject to retrieve the value in the specified
column. This is the class name used for custom mapping.SQLException - if a database access error occurspublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap recursively on the wrapped object or a proxy for that result. If
the receiver is not a wrapper and does not implement the interface, then an SQLException
is thrown.unwrap in interface Wrapperiface - A Class defining an interface that the result must implement.SQLException - If no object found that implements the interfacepublic boolean isWrapperFor(Class<?> iface)
isWrapperFor on the wrapped object. If this does not implement the interface and is not
a wrapper, return false. This method should be implemented as a low-cost operation compared to
unwrap so that callers can use this method to avoid expensive unwrap
calls that may fail. If this method returns true then calling unwrap with the same
argument should succeed.isWrapperFor in interface Wrapperiface - a Class defining an interface.Copyright © 2022 SingleStore. All rights reserved.