An object that can be used to get information about the types and properties of the columns in a ResultSet object. The following code fragment creates the ResultSet object rs, creates the ResultSetMetaData object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE clause.
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
boolean b = rsmd.isSearchable(1);
An object that can be used to get information about the types and properties of the columns in a ResultSet object. The following code fragment creates the ResultSet object rs, creates the ResultSetMetaData object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE clause. ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2"); ResultSetMetaData rsmd = rs.getMetaData(); int numberOfColumns = rsmd.getColumnCount(); boolean b = rsmd.isSearchable(1);
(auto-increment? this column)
Indicates whether the designated column is automatically numbered.
column - the first column is 1, the second is 2, ... - int
returns: true if so; false otherwise - boolean
throws: java.sql.SQLException - if a database access error occurs
Indicates whether the designated column is automatically numbered. column - the first column is 1, the second is 2, ... - `int` returns: true if so; false otherwise - `boolean` throws: java.sql.SQLException - if a database access error occurs
(case-sensitive? this column)
Indicates whether a column's case matters.
column - the first column is 1, the second is 2, ... - int
returns: true if so; false otherwise - boolean
throws: java.sql.SQLException - if a database access error occurs
Indicates whether a column's case matters. column - the first column is 1, the second is 2, ... - `int` returns: true if so; false otherwise - `boolean` throws: java.sql.SQLException - if a database access error occurs
(currency? this column)
Indicates whether the designated column is a cash value.
column - the first column is 1, the second is 2, ... - int
returns: true if so; false otherwise - boolean
throws: java.sql.SQLException - if a database access error occurs
Indicates whether the designated column is a cash value. column - the first column is 1, the second is 2, ... - `int` returns: true if so; false otherwise - `boolean` throws: java.sql.SQLException - if a database access error occurs
(definitely-writable? this column)
Indicates whether a write on the designated column will definitely succeed.
column - the first column is 1, the second is 2, ... - int
returns: true if so; false otherwise - boolean
throws: java.sql.SQLException - if a database access error occurs
Indicates whether a write on the designated column will definitely succeed. column - the first column is 1, the second is 2, ... - `int` returns: true if so; false otherwise - `boolean` throws: java.sql.SQLException - if a database access error occurs
(get-catalog-name this column)
Gets the designated column's table's catalog name.
column - the first column is 1, the second is 2, ... - int
returns: the name of the catalog for the table in which the given column
appears or "" if not applicable - java.lang.String
throws: java.sql.SQLException - if a database access error occurs
Gets the designated column's table's catalog name. column - the first column is 1, the second is 2, ... - `int` returns: the name of the catalog for the table in which the given column appears or "" if not applicable - `java.lang.String` throws: java.sql.SQLException - if a database access error occurs
(get-column-class-name this 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. ResultSet.getObject may return a subclass of the class returned by this method.
column - the first column is 1, the second is 2, ... - int
returns: the fully-qualified name of the class in the Java programming
language that would be used by the method
ResultSet.getObject to retrieve the value in the specified
column. This is the class name used for custom mapping. - java.lang.String
throws: java.sql.SQLException - if a database access error occurs
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. ResultSet.getObject may return a subclass of the class returned by this method. column - the first column is 1, the second is 2, ... - `int` returns: the fully-qualified name of the class in the Java programming language that would be used by the method ResultSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping. - `java.lang.String` throws: java.sql.SQLException - if a database access error occurs
(get-column-count this)
Returns the number of columns in this ResultSet object.
returns: the number of columns - int
throws: java.sql.SQLException - if a database access error occurs
Returns the number of columns in this ResultSet object. returns: the number of columns - `int` throws: java.sql.SQLException - if a database access error occurs
(get-column-display-size this column)
Indicates the designated column's normal maximum width in characters.
column - the first column is 1, the second is 2, ... - int
returns: the normal maximum number of characters allowed as the width
of the designated column - int
throws: java.sql.SQLException - if a database access error occurs
Indicates the designated column's normal maximum width in characters. column - the first column is 1, the second is 2, ... - `int` returns: the normal maximum number of characters allowed as the width of the designated column - `int` throws: java.sql.SQLException - if a database access error occurs
(get-column-label this column)
Gets the designated column's suggested title for use in printouts and displays. The suggested title is usually specified by the SQL 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.
column - the first column is 1, the second is 2, ... - int
returns: the suggested column title - java.lang.String
throws: java.sql.SQLException - if a database access error occurs
Gets the designated column's suggested title for use in printouts and displays. The suggested title is usually specified by the SQL 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. column - the first column is 1, the second is 2, ... - `int` returns: the suggested column title - `java.lang.String` throws: java.sql.SQLException - if a database access error occurs
(get-column-name this column)
Get the designated column's name.
column - the first column is 1, the second is 2, ... - int
returns: column name - java.lang.String
throws: java.sql.SQLException - if a database access error occurs
Get the designated column's name. column - the first column is 1, the second is 2, ... - `int` returns: column name - `java.lang.String` throws: java.sql.SQLException - if a database access error occurs
(get-column-type this column)
Retrieves the designated column's SQL type.
column - the first column is 1, the second is 2, ... - int
returns: SQL type from java.sql.Types - int
throws: java.sql.SQLException - if a database access error occurs
Retrieves the designated column's SQL type. column - the first column is 1, the second is 2, ... - `int` returns: SQL type from java.sql.Types - `int` throws: java.sql.SQLException - if a database access error occurs
(get-column-type-name this column)
Retrieves the designated column's database-specific type name.
column - the first column is 1, the second is 2, ... - int
returns: type name used by the database. If the column type is
a user-defined type, then a fully-qualified type name is returned. - java.lang.String
throws: java.sql.SQLException - if a database access error occurs
Retrieves the designated column's database-specific type name. column - the first column is 1, the second is 2, ... - `int` returns: type name used by the database. If the column type is a user-defined type, then a fully-qualified type name is returned. - `java.lang.String` throws: java.sql.SQLException - if a database access error occurs
(get-precision this column)
Get the designated column's specified column size. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. 0 is returned for data types where the column size is not applicable.
column - the first column is 1, the second is 2, ... - int
returns: precision - int
throws: java.sql.SQLException - if a database access error occurs
Get the designated column's specified column size. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. 0 is returned for data types where the column size is not applicable. column - the first column is 1, the second is 2, ... - `int` returns: precision - `int` throws: java.sql.SQLException - if a database access error occurs
(get-scale this column)
Gets the designated column's number of digits to right of the decimal point. 0 is returned for data types where the scale is not applicable.
column - the first column is 1, the second is 2, ... - int
returns: scale - int
throws: java.sql.SQLException - if a database access error occurs
Gets the designated column's number of digits to right of the decimal point. 0 is returned for data types where the scale is not applicable. column - the first column is 1, the second is 2, ... - `int` returns: scale - `int` throws: java.sql.SQLException - if a database access error occurs
(get-schema-name this column)
Get the designated column's table's schema.
column - the first column is 1, the second is 2, ... - int
returns: schema name or "" if not applicable - java.lang.String
throws: java.sql.SQLException - if a database access error occurs
Get the designated column's table's schema. column - the first column is 1, the second is 2, ... - `int` returns: schema name or "" if not applicable - `java.lang.String` throws: java.sql.SQLException - if a database access error occurs
(get-table-name this column)
Gets the designated column's table name.
column - the first column is 1, the second is 2, ... - int
returns: table name or "" if not applicable - java.lang.String
throws: java.sql.SQLException - if a database access error occurs
Gets the designated column's table name. column - the first column is 1, the second is 2, ... - `int` returns: table name or "" if not applicable - `java.lang.String` throws: java.sql.SQLException - if a database access error occurs
(is-nullable this column)
Indicates the nullability of values in the designated column.
column - the first column is 1, the second is 2, ... - int
returns: the nullability status of the given column; one of columnNoNulls,
columnNullable or columnNullableUnknown - int
throws: java.sql.SQLException - if a database access error occurs
Indicates the nullability of values in the designated column. column - the first column is 1, the second is 2, ... - `int` returns: the nullability status of the given column; one of columnNoNulls, columnNullable or columnNullableUnknown - `int` throws: java.sql.SQLException - if a database access error occurs
(read-only? this column)
Indicates whether the designated column is definitely not writable.
column - the first column is 1, the second is 2, ... - int
returns: true if so; false otherwise - boolean
throws: java.sql.SQLException - if a database access error occurs
Indicates whether the designated column is definitely not writable. column - the first column is 1, the second is 2, ... - `int` returns: true if so; false otherwise - `boolean` throws: java.sql.SQLException - if a database access error occurs
(searchable? this column)
Indicates whether the designated column can be used in a where clause.
column - the first column is 1, the second is 2, ... - int
returns: true if so; false otherwise - boolean
throws: java.sql.SQLException - if a database access error occurs
Indicates whether the designated column can be used in a where clause. column - the first column is 1, the second is 2, ... - `int` returns: true if so; false otherwise - `boolean` throws: java.sql.SQLException - if a database access error occurs
(signed? this column)
Indicates whether values in the designated column are signed numbers.
column - the first column is 1, the second is 2, ... - int
returns: true if so; false otherwise - boolean
throws: java.sql.SQLException - if a database access error occurs
Indicates whether values in the designated column are signed numbers. column - the first column is 1, the second is 2, ... - `int` returns: true if so; false otherwise - `boolean` throws: java.sql.SQLException - if a database access error occurs
(writable? this column)
Indicates whether it is possible for a write on the designated column to succeed.
column - the first column is 1, the second is 2, ... - int
returns: true if so; false otherwise - boolean
throws: java.sql.SQLException - if a database access error occurs
Indicates whether it is possible for a write on the designated column to succeed. column - the first column is 1, the second is 2, ... - `int` returns: true if so; false otherwise - `boolean` throws: java.sql.SQLException - if a database access error occurs
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close