ResultSetMethods

little.sql.ResultSetMethods$package.ResultSetMethods
final implicit class ResultSetMethods(resultSet: ResultSet) extends AnyVal

Provides extension methods for java.sql.ResultSet.

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def flatMap[T](f: ResultSet => Iterable[T]): Seq[T]

Maps remaining rows of ResultSet building a collection using elements returned from map function.

Maps remaining rows of ResultSet building a collection using elements returned from map function.

Value parameters

f

map function

Attributes

def fold[T](init: T)(op: (T, ResultSet) => T): T

Folds remaining rows of ResultSet to single value using given initial value and binary operator.

Folds remaining rows of ResultSet to single value using given initial value and binary operator.

Value parameters

init

initial value

op

binary operator

Attributes

def foreach(f: ResultSet => Unit): Unit

Invokes supplied function for each remaining row of ResultSet.

Invokes supplied function for each remaining row of ResultSet.

Value parameters

f

function

Attributes

def get[T](index: Int)(using getValue: GetValueByIndex[T]): T

Gets column value in current row.

Gets column value in current row.

Type parameters

T

type of value to return

Value parameters

index

column index

Attributes

def get[T](label: String)(using getValue: GetValueByLabel[T]): T

Gets column value in current row.

Gets column value in current row.

Type parameters

T

type of value to return

Value parameters

label

column label

Attributes

def getColumnCount(): Int

Gets column count.

Gets column count.

Attributes

def getColumnLabels(): Seq[String]

Gets column labels.

Gets column labels.

Attributes

def getInstant(index: Int): Instant

Gets column value as Instant.

Gets column value as Instant.

Attributes

def getInstant(label: String): Instant

Gets column value as Instant.

Gets column value as Instant.

Attributes

def getLocalDate(index: Int): LocalDate

Gets column value as LocalDate.

Gets column value as LocalDate.

Attributes

def getLocalDate(label: String): LocalDate

Gets column value as LocalDate.

Gets column value as LocalDate.

Attributes

def getLocalDateTime(index: Int): LocalDateTime

Gets column value as LocalDateTime.

Gets column value as LocalDateTime.

Attributes

def getLocalDateTime(label: String): LocalDateTime

Gets column value as LocalDateTime.

Gets column value as LocalDateTime.

Attributes

def getLocalTime(index: Int): LocalTime

Gets column value as LocalTime.

Gets column value as LocalTime.

Attributes

def getLocalTime(label: String): LocalTime

Gets column value as LocalTime.

Gets column value as LocalTime.

Attributes

def getOption[T](index: Int)(using getValue: GetValueByIndex[T]): Option[T]

Gets column value in current row if value is not null.

Gets column value in current row if value is not null.

Type parameters

T

type of value to return

Value parameters

index

column index

Attributes

def getOption[T](label: String)(using getValue: GetValueByLabel[T]): Option[T]

Gets column value in current row if value is not null.

Gets column value in current row if value is not null.

Type parameters

T

type of value to return

Value parameters

label

column label

Attributes

def getOrElse[T](index: Int, default: => T)(using getValue: GetValueByIndex[T]): T

Gets column value in current row, or returns default if value is null.

Gets column value in current row, or returns default if value is null.

Type parameters

T

type of value to return

Value parameters

default

default value

index

column index

Attributes

def getOrElse[T](label: String, default: => T)(using getValue: GetValueByLabel[T]): T

Gets column value in current row, or returns default if value is null.

Gets column value in current row, or returns default if value is null.

Type parameters

T

type of value to return

Value parameters

default

default value

label

column label

Attributes

def map[T](f: ResultSet => T): Seq[T]

Maps remaining rows of ResultSet using supplied function.

Maps remaining rows of ResultSet using supplied function.

Value parameters

f

map function

Attributes

def next[T](f: ResultSet => T): Option[T]

Maps next row of ResultSet using supplied function.

Maps next row of ResultSet using supplied function.

If the result set has another row, and if the supplied function's return value is not null, then Some value is returned; otherwise, None is returned.

Value parameters

f

map function

Attributes