ResultSet

ldbc.sql.ResultSet
See theResultSet companion object
trait ResultSet

A table of data representing a database result set, which is usually generated by executing a statement that queries the database.

TODO: Eventually replace with java.sql for cross-platform support

Attributes

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

Members list

Value members

Abstract methods

def absolute(row: Int): Boolean

Moves the cursor to the given row number in this ResultSet object.

Moves the cursor to the given row number in this ResultSet object.

If the row number is positive, the cursor moves to the given row number with respect to the beginning of the result set. The first row is row 1, the second is row 2, and so on.

If the given row number is negative, the cursor moves to an absolute row position with respect to the end of the result set. For example, calling the method absolute(-1) positions the cursor on the last row; calling the method absolute(-2) moves the cursor to the next-to-last row, and so on.

If the row number specified is zero, the cursor is moved to before the first row.

An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before the first row or after the last row.

Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().

Value parameters

row

the number of the row to which the cursor should move. A value of zero indicates that the cursor will be positioned before the first row; a positive number indicates the row number counting from the beginning of the result set; a negative number indicates the row number counting from the end of the result set

Attributes

Returns

true if the cursor is moved to a position in this

Source
ResultSet.scala
def afterLast(): Unit

Moves the cursor to the end of this ResultSet object, just after the last row. This method has no effect if the result set contains no rows.

Moves the cursor to the end of this ResultSet object, just after the last row. This method has no effect if the result set contains no rows.

Attributes

Source
ResultSet.scala
def beforeFirst(): Unit

Moves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.

Moves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.

Attributes

Source
ResultSet.scala
def close(): Unit

Releases this ResultSet object's database and ldbc resources immediately instead of waiting for this to happen when it is automatically closed.

Releases this ResultSet object's database and ldbc resources immediately instead of waiting for this to happen when it is automatically closed.

The closing of a ResultSet object does not close the Blob, Clob or NClob objects created by the ResultSet. Blob, Clob or NClob objects remain valid for at least the duration of the transaction in which they are created, unless their free method is invoked.

When a ResultSet is closed, any ResultSetMetaData instances that were created by calling the getMetaData method remain accessible.

Note: A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results.

Calling the method close on a ResultSet object that is already closed is a no-op.

Attributes

Source
ResultSet.scala
def first(): Boolean

Moves the cursor to the first row in this ResultSet object.

Moves the cursor to the first row in this ResultSet object.

Attributes

Returns

true if the cursor is on a valid row; false if there are no rows in the result set

Source
ResultSet.scala
def getBigDecimal(columnIndex: Int): BigDecimal

Retrieves the value of the designated column in the current row of this ResultSet object as a scala.math.BigDecimal with full precision.

Retrieves the value of the designated column in the current row of this ResultSet object as a scala.math.BigDecimal with full precision.

Value parameters

columnIndex

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

Attributes

Returns

the column value (full precision); if the value is SQL null, the value returned is None in the Scala programming language.

Source
ResultSet.scala
def getBigDecimal(columnLabel: String): BigDecimal

Retrieves the value of the designated column in the current row of this ResultSet object as a scala.math.BigDecimal with full precision.

Retrieves the value of the designated column in the current row of this ResultSet object as a scala.math.BigDecimal with full precision.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value (full precision); if the value is SQL NULL, the value returned is null in the Scala programming language.

Source
ResultSet.scala
def getBoolean(columnIndex: Int): Boolean

Retrieves the value of the designated column in the current row of this ResultSet object as a Boolean in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Boolean in the Scala programming language.

If the designated column has a datatype of CHAR or VARCHAR and contains a "0" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 0, a value of false is returned. If the designated column has a datatype of CHAR or VARCHAR and contains a "1" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 1, a value of true is returned.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is false

Source
ResultSet.scala
def getBoolean(columnLabel: String): Boolean

Retrieves the value of the designated column in the current row of this ResultSet object as a Boolean in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Boolean in the Scala programming language.

If the designated column has a datatype of CHAR or VARCHAR and contains a "0" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 0, a value of false is returned. If the designated column has a datatype of CHAR or VARCHAR and contains a "1" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 1, a value of true is returned.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is false

Source
ResultSet.scala
def getByte(columnIndex: Int): Byte

Retrieves the value of the designated column in the current row of this ResultSet object as a Byte in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Byte in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getByte(columnLabel: String): Byte

Retrieves the value of the designated column in the current row of this ResultSet object as a Byte in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Byte in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getBytes(columnIndex: Int): Array[Byte]

Retrieves the value of the designated column in the current row of this ResultSet object as a Byte array in the Scala programming language. The bytes represent the raw values returned by the driver.

Retrieves the value of the designated column in the current row of this ResultSet object as a Byte array in the Scala programming language. The bytes represent the raw values returned by the driver.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala
def getBytes(columnLabel: String): Array[Byte]

Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Scala programming language. The bytes represent the raw values returned by the driver.

Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Scala programming language. The bytes represent the raw values returned by the driver.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala

Retrieves the concurrency mode of this ResultSet object. The concurrency used is determined by the Statement object that created the result set.

Retrieves the concurrency mode of this ResultSet object. The concurrency used is determined by the Statement object that created the result set.

Attributes

Returns

the concurrency type, either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE

Source
ResultSet.scala
def getDate(columnIndex: Int): LocalDate

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalDate object in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalDate object in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala
def getDate(columnLabel: String): LocalDate

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalDate object in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalDate object in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala
def getDouble(columnIndex: Int): Double

Retrieves the value of the designated column in the current row of this ResultSet object as a Double in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Double in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getDouble(columnLabel: String): Double

Retrieves the value of the designated column in the current row of this ResultSet object as a Double in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Double in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getFloat(columnIndex: Int): Float

Retrieves the value of the designated column in the current row of this ResultSet object as a Float in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Float in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getFloat(columnLabel: String): Float

Retrieves the value of the designated column in the current row of this ResultSet object as a Float in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Float in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getInt(columnIndex: Int): Int

Retrieves the value of the designated column in the current row of this ResultSet object as an Int in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as an Int in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getInt(columnLabel: String): Int

Retrieves the value of the designated column in the current row of this ResultSet object as an Int in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as an Int in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getLong(columnIndex: Int): Long

Retrieves the value of the designated column in the current row of this ResultSet object as a Long in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Long in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getLong(columnLabel: String): Long

Retrieves the value of the designated column in the current row of this ResultSet object as a Long in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Long in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala

Retrieves the number, types and properties of this ResultSet object's columns.

Retrieves the number, types and properties of this ResultSet object's columns.

Attributes

Returns

the description of this ResultSet object's columns

Source
ResultSet.scala
def getRow(): Int

Retrieves the current row number. The first row is number 1, the second number 2, and so on.

Retrieves the current row number. The first row is number 1, the second number 2, and so on.

Note:Support for the getRow method is optional for ResultSets with a result set type of TYPE_FORWARD_ONLY

Attributes

Returns

the current row number; 0 if there is no current row

Source
ResultSet.scala
def getShort(columnIndex: Int): Short

Retrieves the value of the designated column in the current row of this ResultSet object as a Short in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Short in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getShort(columnLabel: String): Short

Retrieves the value of the designated column in the current row of this ResultSet object as a Short in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a Short in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is 0

Source
ResultSet.scala
def getString(columnIndex: Int): String

Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala
def getString(columnLabel: String): String

Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala
def getTime(columnIndex: Int): LocalTime

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalTime object in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalTime object in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala
def getTime(columnLabel: String): LocalTime

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalTime object in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalTime object in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala
def getTimestamp(columnIndex: Int): LocalDateTime

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalDateTime object in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalDateTime object in the Scala programming language.

Value parameters

columnIndex

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

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala
def getTimestamp(columnLabel: String): LocalDateTime

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalDateTime object in the Scala programming language.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.time.LocalDateTime object in the Scala programming language.

Value parameters

columnLabel

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Attributes

Returns

the column value; if the value is SQL NULL, the value returned is null

Source
ResultSet.scala
def getType(): Int

Retrieves the type of this ResultSet object. The type is determined by the Statement object that created the result set.

Retrieves the type of this ResultSet object. The type is determined by the Statement object that created the result set.

Attributes

Returns

ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE

Source
ResultSet.scala

Retrieves whether the cursor is after the last row in this ResultSet object.

Retrieves whether the cursor is after the last row in this ResultSet object.

Note:Support for the isAfterLast method is optional for ResultSets with a result set type of TYPE_FORWARD_ONLY

Attributes

Returns

true if the cursor is after the last row; false if the cursor is at any other position or the result set contains no rows

Source
ResultSet.scala

Retrieves whether the cursor is before the first row in this ResultSet object.

Retrieves whether the cursor is before the first row in this ResultSet object.

Note:Support for the isBeforeFirst method is optional for ResultSets with a result set type of TYPE_FORWARD_ONLY

Attributes

Returns

true if the cursor is before the first row; false if the cursor is at any other position or the result set contains no rows

Source
ResultSet.scala
def isFirst(): Boolean

Retrieves whether the cursor is on the first row of this ResultSet object.

Retrieves whether the cursor is on the first row of this ResultSet object.

Note:Support for the isFirst method is optional for ResultSets with a result set type of TYPE_FORWARD_ONLY

Attributes

Returns

true if the cursor is on the first row; false otherwise

Source
ResultSet.scala
def isLast(): Boolean

Retrieves whether the cursor is on the last row of this ResultSet object. Note: Calling the method isLast may be expensive because the ldbc might need to fetch ahead one row in order to determine whether the current row is the last row in the result set.

Retrieves whether the cursor is on the last row of this ResultSet object. Note: Calling the method isLast may be expensive because the ldbc might need to fetch ahead one row in order to determine whether the current row is the last row in the result set.

Note: Support for the isLast method is optional for ResultSets with a result set type of TYPE_FORWARD_ONLY

Attributes

Returns

true if the cursor is on the last row; false otherwise

Source
ResultSet.scala
def last(): Boolean

Moves the cursor to the last row in this ResultSet object.

Moves the cursor to the last row in this ResultSet object.

Attributes

Returns

true if the cursor is on a valid row; false if there are no rows in the result set

Source
ResultSet.scala
def next(): Boolean

Moves the cursor forward one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.

Moves the cursor forward one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.

When a call to the next method returns false, the cursor is positioned after the last row. Any invocation of a ResultSet method which requires a current row will result in a SQLException being thrown. If the result set type is TYPE_FORWARD_ONLY, it is vendor specified whether their JDBC driver implementation will return false or throw an SQLException on a subsequent call to next.

If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read.

Attributes

Returns

true if the new current row is valid; false if there are no more rows

Source
ResultSet.scala
def previous(): Boolean

Moves the cursor to the previous row in this ResultSet object.

Moves the cursor to the previous row in this ResultSet object.

When a call to the previous method returns false, the cursor is positioned before the first row. Any invocation of a ResultSet method which requires a current row will result in a SQLException being thrown.

Attributes

Returns

true if the cursor is now positioned on a valid row; false if the cursor is positioned before the first row

Source
ResultSet.scala
def relative(rows: Int): Boolean

Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position.

Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position.

Note: Calling the method relative(1) is identical to calling the method next() and calling the method relative(-1) is identical to calling the method previous().

Value parameters

rows

an int specifying the number of rows to move from the current row; a positive number moves the cursor forward; a negative number moves the cursor backward

Attributes

Returns

true if the cursor is on a row; false otherwise

Source
ResultSet.scala
def wasNull(): Boolean

Reports whether the last column read had a value of SQL NULL. Note that you must first call one of the getter methods on a column to try to read its value and then call the method wasNull to see if the value read was SQL NULL.

Reports whether the last column read had a value of SQL NULL. Note that you must first call one of the getter methods on a column to try to read its value and then call the method wasNull to see if the value read was SQL NULL.

Attributes

Returns

true if the last column value read was SQL NULL and false otherwise

Source
ResultSet.scala