ResultSetMetaData

ldbc.sql.ResultSetMetaData
See theResultSetMetaData companion object

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.

 for
   rs <- stmt.executeQuery("SELECT a, b, c FROM TABLE2")
   rsmd <- rs.getMetaData()
 yield
   val rsmd = rs.getMetaData()
   val numberOfColumns = rsmd.getColumnCount()
   val b = rsmd.isSearchable(1)

Attributes

Companion
object
Source
ResultSetMetaData.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def getCatalogName(column: Int): String

Gets the designated column's table's catalog name.

Gets the designated column's table's catalog name.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

the name of the catalog for the table in which the given column appears or "" if not applicable

Source
ResultSetMetaData.scala

Returns the number of columns in this ResultSet object.

Returns the number of columns in this ResultSet object.

Attributes

Returns

the number of columns

Source
ResultSetMetaData.scala
def getColumnDisplaySize(column: Int): Int

Indicates the designated column's normal maximum width in characters.

Indicates the designated column's normal maximum width in characters.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

the normal maximum number of characters allowed as the width of the designated column

Source
ResultSetMetaData.scala
def getColumnLabel(column: Int): String

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.

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.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

the suggested column title

Source
ResultSetMetaData.scala
def getColumnName(column: Int): String

Get the designated column's name.

Get the designated column's name.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

column name

Source
ResultSetMetaData.scala
def getColumnType(column: Int): Int

Retrieves the designated column's SQL type.

Retrieves the designated column's SQL type.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

SQL type from java.sql.Types

Source
ResultSetMetaData.scala
def getColumnTypeName(column: Int): String

Retrieves the designated column's database-specific type name.

Retrieves the designated column's database-specific type name.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

type name used by the database. If the column type is a user-defined type, then a fully-qualified type name is returned.

Source
ResultSetMetaData.scala
def getPrecision(column: Int): Int

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.

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.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

precision

Source
ResultSetMetaData.scala
def getScale(column: Int): Int

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.

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.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

scale

Source
ResultSetMetaData.scala
def getSchemaName(column: Int): String

Get the designated column's table's schema.

Get the designated column's table's schema.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

schema name or "" if not applicable

Source
ResultSetMetaData.scala
def getTableName(column: Int): String

Gets the designated column's table name.

Gets the designated column's table name.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

table name or "" if not applicable

Source
ResultSetMetaData.scala
def isAutoIncrement(column: Int): Boolean

Indicates whether the designated column is automatically numbered.

Indicates whether the designated column is automatically numbered.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

true if so; false otherwise

Source
ResultSetMetaData.scala
def isCaseSensitive(column: Int): Boolean

Indicates whether the designated column can be used in a where clause.

Indicates whether the designated column can be used in a where clause.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

true if so; false otherwise

Source
ResultSetMetaData.scala
def isCurrency(column: Int): Boolean

Indicates whether the designated column is a cash value.

Indicates whether the designated column is a cash value.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

true if so; false otherwise

Source
ResultSetMetaData.scala

Indicates whether a write on the designated column will definitely succeed.

Indicates whether a write on the designated column will definitely succeed.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

true if so; false otherwise

Source
ResultSetMetaData.scala
def isNullable(column: Int): Int

Indicates the nullability of values in the designated column.

Indicates the nullability of values in the designated column.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

the nullability status of the given column; one of columnNoNulls, columnNullable or columnNullableUnknown

Source
ResultSetMetaData.scala
def isReadOnly(column: Int): Boolean

Indicates whether the designated column is definitely not writable.

Indicates whether the designated column is definitely not writable.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

true if so; false otherwise

Source
ResultSetMetaData.scala
def isSearchable(column: Int): Boolean

Indicates whether the designated column can be used in a where clause.

Indicates whether the designated column can be used in a where clause.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

true if so; false otherwise

Source
ResultSetMetaData.scala
def isSigned(column: Int): Boolean

Indicates whether values in the designated column are signed numbers.

Indicates whether values in the designated column are signed numbers.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

true if so; false otherwise

Source
ResultSetMetaData.scala
def isWritable(column: Int): Boolean

Indicates whether it is possible for a write on the designated column to succeed.

Indicates whether it is possible for a write on the designated column to succeed.

Value parameters

column

the first column is 1, the second is 2, ...

Attributes

Returns

true if so; false otherwise

Source
ResultSetMetaData.scala