trait Row extends AnyRef

Represents a row of a result returned by a database engine.

This class defines a set of methods that can be used to get values from the row either by a column name or by a column index. Each method has a version returning an Option to allow null-safe handling of SQL null values.

Linear Supertypes
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Row
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Generic getters

Methods in this group can be used for fetching values of types not supported by rdbc API out of the box.

  1. abstract def col[A](name: String): A

    [use case] Returns an object of type A from column with a given name.

    [use case]

    Returns an object of type A from column with a given name.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

    Full Signature

    abstract def col[A](name: String)(implicit arg0: ClassTag[A]): A

  2. abstract def col[A](idx: Int): A

    [use case] Returns an object of type A from column with a given index.

    [use case]

    Returns an object of type A from column with a given index.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

    Full Signature

    abstract def col[A](idx: Int)(implicit arg0: ClassTag[A]): A

  3. abstract def colOpt[A](name: String): Option[A]

    [use case] Returns an object of type A from column with a given name.

    [use case]

    Returns an object of type A from column with a given name.

    For SQL null values None is returned.

    Throws:

    Full Signature

    abstract def colOpt[A](name: String)(implicit arg0: ClassTag[A]): Option[A]

  4. abstract def colOpt[A](idx: Int): Option[A]

    [use case] Returns an object of type A from column with a given index.

    [use case]

    Returns an object of type A from column with a given index.

    For SQL null values None is returned.

    Throws:

    Full Signature

    abstract def colOpt[A](idx: Int)(implicit arg0: ClassTag[A]): Option[A]

Unbounded number getters

  1. abstract def bigDecimal(idx: Int): BigDecimal

    Returns a BigDecimal from column with a given index.

    Returns a BigDecimal from column with a given index.

    All numeric types can be converted to BigDecimal, note however that NaN value is not representable by a BigDecimal. If you expect values to be NaN use decimal method instead.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  2. abstract def bigDecimal(name: String): BigDecimal

    Returns a BigDecimal from column with a given name.

    Returns a BigDecimal from column with a given name.

    All numeric types can be converted to BigDecimal, note however that NaN value is not representable by a BigDecimal. If you expect values to be NaN use decimal method instead.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  3. abstract def bigDecimalOpt(idx: Int): Option[BigDecimal]

    Returns a BigDecimal from column with a given index.

    Returns a BigDecimal from column with a given index.

    All numeric types can be converted to BigDecimal, note however that NaN value is not representable by a BigDecimal. If you expect values to be NaN use decimal method instead.

    For SQL null values None is returned.

    Throws:

  4. abstract def bigDecimalOpt(name: String): Option[BigDecimal]

    Returns a BigDecimal from column with a given name.

    Returns a BigDecimal from column with a given name.

    All numeric types can be converted to BigDecimal, note however that NaN value is not representable by a BigDecimal. If you expect values to be NaN use decimal method instead.

    For SQL null values None is returned.

    Throws:

  5. abstract def decimal(idx: Int): DecimalNumber

    Returns a DecimalNumber from column with a given index.

    Returns a DecimalNumber from column with a given index.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  6. abstract def decimal(name: String): DecimalNumber

    Returns a DecimalNumber from column with a given name.

    Returns a DecimalNumber from column with a given name.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  7. abstract def decimalOpt(idx: Int): Option[DecimalNumber]

    Returns a DecimalNumber from column with a given index.

    Returns a DecimalNumber from column with a given index.

    For SQL null values None is returned.

    Throws:

  8. abstract def decimalOpt(name: String): Option[DecimalNumber]

    Returns a DecimalNumber from column with a given name.

    Returns a DecimalNumber from column with a given name.

    For SQL null values None is returned.

    Throws:

Bool getters

  1. abstract def bool(idx: Int): Boolean

    Returns a boolean value from column with a given index.

    Returns a boolean value from column with a given index.

    • A single 'T', 'Y' or '1' character values or 1 numeric value are considered true.
    • A single 'F', 'N' or '0' character values or 0 numeric value are considered false.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  2. abstract def bool(name: String): Boolean

    Returns a boolean value from column with a given name.

    Returns a boolean value from column with a given name.

    • A single 'T', 'Y' or '1' character values or 1 numeric value are considered true.
    • A single 'F', 'N' or '0' character values or 0 numeric value are considered false.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  3. abstract def boolOpt(idx: Int): Option[Boolean]

    Returns a boolean value from column with a given index.

    Returns a boolean value from column with a given index.

    • A single 'T', 'Y' or '1' character values or 1 numeric value are considered true.
    • A single 'F', 'N' or '0' character values or 0 numeric value are considered false.

    For SQL null values None is returned.

    Throws:

  4. abstract def boolOpt(name: String): Option[Boolean]

    Returns a boolean value from column with a given name.

    Returns a boolean value from column with a given name.

    • A single 'T', 'Y' or '1' character values or 1 numeric value are considered true.
    • A single 'F', 'N' or '0' character values or 0 numeric value are considered false.

    For SQL null values None is returned.

    Throws:

Binary getters

  1. abstract def bytes(idx: Int): Array[Byte]

    Returns a byte array from column with a given index.

    Returns a byte array from column with a given index.

    Note that this method cannot be used to fetch raw value of any type from the database, it should be used only to fetch binary data.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  2. abstract def bytes(name: String): Array[Byte]

    Returns a byte array from column with a given name.

    Returns a byte array from column with a given name.

    Note that this method cannot be used to fetch raw value of any type from the database, it should be used only to fetch binary data.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  3. abstract def bytesOpt(idx: Int): Option[Array[Byte]]

    Returns a byte array from column with a given index.

    Returns a byte array from column with a given index.

    Note that this method cannot be used to fetch raw value of any type from the database, it should be used only to fetch binary data.

    For SQL null values None is returned.

    Throws:

  4. abstract def bytesOpt(name: String): Option[Array[Byte]]

    Returns a byte array from column with a given name.

    Returns a byte array from column with a given name.

    Note that this method cannot be used to fetch raw value of any type from the database, it should be used only to fetch binary data.

    For SQL null values None is returned.

    Throws:

Char getters

  1. abstract def char(idx: Int): Char

    Returns a character from column with a given index.

    Returns a character from column with a given index.

    Varchar types with a single character are convertible to a Char.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  2. abstract def char(name: String): Char

    Returns a character from column with a given name.

    Returns a character from column with a given name.

    Varchar types with a single character are convertible to a Char.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  3. abstract def charOpt(idx: Int): Option[Char]

    Returns a character from column with a given index.

    Returns a character from column with a given index.

    Varchar types with a single character are convertible to a Char.

    For SQL null values None is returned.

    Throws:

  4. abstract def charOpt(name: String): Option[Char]

    Returns a character from column with a given name.

    Returns a character from column with a given name.

    Varchar types with a single character are convertible to a Char.

    For SQL null values None is returned.

    Throws:

Floating point number getters

  1. abstract def double(idx: Int): Double

    Returns a Double from column with a given index.

    Returns a Double from column with a given index.

    All numeric types can be converted to Double, but some conversions may involve rounding or truncation.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  2. abstract def double(name: String): Double

    Returns a Double from column with a given name.

    Returns a Double from column with a given name.

    All numeric types can be converted to Double, but some conversions may involve rounding or truncation.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  3. abstract def doubleOpt(idx: Int): Option[Double]

    Returns a Double from column with a given index.

    Returns a Double from column with a given index.

    All numeric types can be converted to Double, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

  4. abstract def doubleOpt(name: String): Option[Double]

    Returns a Double from column with a given name.

    Returns a Double from column with a given name.

    All numeric types can be converted to Double, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

  5. abstract def float(idx: Int): Float

    Returns a Float from column with a given index.

    Returns a Float from column with a given index.

    All numeric types can be converted to Float, but some conversions may involve rounding or truncation.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  6. abstract def float(name: String): Float

    Returns a Float from column with a given name.

    Returns a Float from column with a given name.

    All numeric types can be converted to Float, but some conversions may involve rounding or truncation.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  7. abstract def floatOpt(idx: Int): Option[Float]

    Returns a Float from column with a given index.

    Returns a Float from column with a given index.

    All numeric types can be converted to Float, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

  8. abstract def floatOpt(name: String): Option[Float]

    Returns a Float from column with a given name.

    Returns a Float from column with a given name.

    All numeric types can be converted to Float, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

Integral number getters

  1. abstract def int(idx: Int): Int

    Returns an Int from column with a given index.

    Returns an Int from column with a given index.

    All numeric types can be converted to Int, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

  2. abstract def int(name: String): Int

    Returns an Int from column with a given name.

    Returns an Int from column with a given name.

    All numeric types can be converted to Int, but some conversions may involve rounding or truncation.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  3. abstract def intOpt(idx: Int): Option[Int]

    Returns an Int from column with a given index.

    Returns an Int from column with a given index.

    All numeric types can be converted to Int, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

  4. abstract def intOpt(name: String): Option[Int]

    Returns an Int from column with a given name.

    Returns an Int from column with a given name.

    All numeric types can be converted to Int, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

  5. abstract def long(idx: Int): Long

    Returns a Long from column with a given index.

    Returns a Long from column with a given index.

    All numeric types can be converted to Long, but some conversions may involve rounding or truncation.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  6. abstract def long(name: String): Long

    Returns a Long from column with a given name.

    Returns a Long from column with a given name.

    All numeric types can be converted to Long, but some conversions may involve rounding or truncation.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  7. abstract def longOpt(idx: Int): Option[Long]

    Returns a Long from column with a given index.

    Returns a Long from column with a given index.

    All numeric types can be converted to Long, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

  8. abstract def longOpt(name: String): Option[Long]

    Returns a Long from column with a given name.

    Returns a Long from column with a given name.

    All numeric types can be converted to Long, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

  9. abstract def short(idx: Int): Short

    Returns a Short from column with a given index.

    Returns a Short from column with a given index.

    All numeric types can be converted to Short, but some conversions may involve rounding or truncation.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  10. abstract def short(name: String): Short

    Returns a Short from column with a given name.

    Returns a Short from column with a given name.

    All numeric types can be converted to Short, but some conversions may involve rounding or truncation.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  11. abstract def shortOpt(idx: Int): Option[Short]

    Returns a Short from column with a given index.

    Returns a Short from column with a given index.

    All numeric types can be converted to Short, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

  12. abstract def shortOpt(name: String): Option[Short]

    Returns a Short from column with a given name.

    Returns a Short from column with a given name.

    All numeric types can be converted to Short, but some conversions may involve rounding or truncation.

    For SQL null values None is returned.

    Throws:

Date/time getters

  1. abstract def instant(idx: Int, zoneId: ZoneId): Instant

    Returns an Instant from column with a given index, assuming that the TIMESTAMP value stored in the database is in the provided time zone.

    Returns an Instant from column with a given index, assuming that the TIMESTAMP value stored in the database is in the provided time zone.

    The zoneId parameter is ignored in case the driver can create an instant from the stored value without an user-provided time zone. This can happen if the database stores TIMESTAMP values as instants or for columns with TIMESTAMP WITH TIME ZONE types.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  2. abstract def instant(name: String, zoneId: ZoneId): Instant

    Returns an Instant from column with a given name, assuming that the TIMESTAMP value stored in the database is in the provided time zone.

    Returns an Instant from column with a given name, assuming that the TIMESTAMP value stored in the database is in the provided time zone.

    The zoneId parameter is ignored in case the driver can create an instant from the stored value without an user-provided time zone. This can happen if the database stores TIMESTAMP values as instants or for columns with TIMESTAMP WITH TIME ZONE types.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  3. abstract def instant(idx: Int): Instant

    Returns an Instant from column with a given index.

    Returns an Instant from column with a given index.

    Note that standard SQL TIMESTAMP values are not convertible to an Instant because they do not hold a time zone information.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  4. abstract def instant(name: String): Instant

    Returns an Instant from column with a given name.

    Returns an Instant from column with a given name.

    Note that regular timestamp values are not convertible to an Instant because timestamp values do not hold a time zone information.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  5. abstract def instantOpt(idx: Int, zoneId: ZoneId): Option[Instant]

    Returns an Instant from column with a given index, assuming that the TIMESTAMP value stored in the database is in the provided time zone.

    Returns an Instant from column with a given index, assuming that the TIMESTAMP value stored in the database is in the provided time zone.

    The zoneId parameter is ignored in case the driver can create an instant from the stored value without an user-provided time zone. This can happen if the database stores TIMESTAMP values as instants or for columns with TIMESTAMP WITH TIME ZONE types.

    For SQL null values None is returned.

    Throws:

  6. abstract def instantOpt(name: String, zoneId: ZoneId): Option[Instant]

    Returns an Instant from column with a given name, assuming that the TIMESTAMP value stored in the database is in the provided time zone.

    Returns an Instant from column with a given name, assuming that the TIMESTAMP value stored in the database is in the provided time zone.

    The zoneId parameter is ignored in case the driver can create an instant from the stored value without an user-provided time zone. This can happen if the database stores TIMESTAMP values as instants or for columns with TIMESTAMP WITH TIME ZONE types.

    For SQL null values None is returned.

    Throws:

  7. abstract def instantOpt(idx: Int): Option[Instant]

    Returns an Instant from column with a given index.

    Returns an Instant from column with a given index.

    Note that regular timestamp values are not convertible to an Instant because timestamp values do not hold a time zone information.

    For SQL null values None is returned.

    Throws:

  8. abstract def instantOpt(name: String): Option[Instant]

    Returns an Instant from column with a given name.

    Returns an Instant from column with a given name.

    Note that standard SQL TIMESTAMP values are not convertible to an Instant because they do not hold a time zone information.

    For SQL null values None is returned.

    Throws:

  9. abstract def localDate(idx: Int): LocalDate

    Returns a LocalDate from column with a given index.

    Returns a LocalDate from column with a given index.

    SQL types that represent a date with a time are convertible to LocalDate - a time part is truncated.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  10. abstract def localDate(name: String): LocalDate

    Returns a LocalDate from column with a given name.

    Returns a LocalDate from column with a given name.

    SQL types that represent a date with a time are convertible to LocalDate - a time part is truncated.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  11. abstract def localDateOpt(idx: Int): Option[LocalDate]

    Returns a LocalDate from column with a given index.

    Returns a LocalDate from column with a given index.

    SQL types that represent a date with a time are convertible to LocalDate - a time part is truncated.

    For SQL null values None is returned.

    Throws:

  12. abstract def localDateOpt(name: String): Option[LocalDate]

    Returns a LocalDate from column with a given name.

    Returns a LocalDate from column with a given name.

    SQL types that represent a date with a time are convertible to LocalDate - a time part is truncated.

    For SQL null values None is returned.

    Throws:

  13. abstract def localDateTime(idx: Int): LocalDateTime

    Returns a LocalDateTime from column with a given index.

    Returns a LocalDateTime from column with a given index.

    For SQL date type that does not hold a time, LocalDateTime at start of day is returned.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  14. abstract def localDateTime(name: String): LocalDateTime

    Returns a LocalDateTime from column with a given name.

    Returns a LocalDateTime from column with a given name.

    For SQL date type that does not hold a time, LocalDateTime at start of day is returned.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  15. abstract def localDateTimeOpt(idx: Int): Option[LocalDateTime]

    Returns a LocalDateTime from column with a given index.

    Returns a LocalDateTime from column with a given index.

    For SQL date type that does not hold a time, LocalDateTime at start of day is returned.

    For SQL null values None is returned.

    Throws:

  16. abstract def localDateTimeOpt(name: String): Option[LocalDateTime]

    Returns a LocalDateTime from column with a given name.

    Returns a LocalDateTime from column with a given name.

    For SQL date type that does not hold a time, LocalDateTime at start of day is returned.

    For SQL null values None is returned.

    Throws:

  17. abstract def localTime(idx: Int): LocalTime

    Returns a LocalDate from column with a given index.

    Returns a LocalDate from column with a given index.

    SQL types that represent a date with a time are convertible to LocalTime - a date part is truncated.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  18. abstract def localTime(name: String): LocalTime

    Returns a LocalDate from column with a given name.

    Returns a LocalDate from column with a given name.

    SQL types that represent a date with a time are convertible to LocalTime - a date part is truncated.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  19. abstract def localTimeOpt(idx: Int): Option[LocalTime]

    Returns a LocalDate from column with a given index.

    Returns a LocalDate from column with a given index.

    SQL types that represent a date with a time are convertible to LocalTime - a date part is truncated.

    For SQL null values None is returned.

    Throws:

  20. abstract def localTimeOpt(name: String): Option[LocalTime]

    Returns a LocalDate from column with a given name.

    Returns a LocalDate from column with a given name.

    SQL types that represent a date with a time are convertible to LocalTime - a date part is truncated.

    For SQL null values None is returned.

    Throws:

  21. abstract def zonedDateTime(idx: Int): ZonedDateTime

    Returns a ZonedDateTime from column with a given index.

    Returns a ZonedDateTime from column with a given index.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  22. abstract def zonedDateTime(name: String): ZonedDateTime

    Returns a ZonedDateTime from column with a given name.

    Returns a ZonedDateTime from column with a given name.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  23. abstract def zonedDateTimeOpt(idx: Int): Option[ZonedDateTime]

    Returns a ZonedDateTime from column with a given index.

    Returns a ZonedDateTime from column with a given index.

    For SQL null values None is returned.

    Throws:

  24. abstract def zonedDateTimeOpt(name: String): Option[ZonedDateTime]

    Returns a ZonedDateTime from column with a given name.

    Returns a ZonedDateTime from column with a given name.

    For SQL null values None is returned.

    Throws:

String getters

  1. abstract def str(idx: Int): String

    Returns a String from column with a given index.

    Returns a String from column with a given index.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  2. abstract def str(name: String): String

    Returns a String from column with a given name.

    Returns a String from column with a given name.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  3. abstract def strOpt(idx: Int): Option[String]

    Returns a String from column with a given index.

    Returns a String from column with a given index.

    For SQL null values None is returned.

    Throws:

  4. abstract def strOpt(name: String): Option[String]

    Returns a String from column with a given name.

    Returns a String from column with a given name.

    For SQL null values None is returned.

    Throws:

UUID getters

  1. abstract def uuid(idx: Int): UUID

    Returns an UUID from column with a given index.

    Returns an UUID from column with a given index.

    A string type with a standard UUID representation as defined by UUID.fromString is convertible to UUID.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  2. abstract def uuid(name: String): UUID

    Returns an UUID from column with a given name.

    Returns an UUID from column with a given name.

    A string type with a standard UUID representation as defined by UUID.fromString is convertible to UUID.

    For SQL null values, ConversionException is thrown. For null-safety consider using corresponding *Opt method.

    Throws:

  3. abstract def uuidOpt(idx: Int): Option[UUID]

    Returns an UUID from column with a given index.

    Returns an UUID from column with a given index.

    A string type with a standard UUID representation as defined by UUID.fromString is convertible to UUID.

    For SQL null values None is returned.

    Throws:

  4. abstract def uuidOpt(name: String): Option[UUID]

    Returns an UUID from column with a given name.

    Returns an UUID from column with a given name.

    A string type with a standard UUID representation as defined by UUID.fromString is convertible to UUID.

    For SQL null values None is returned.

    Throws: