Object/Trait

anorm

Column

Related Docs: trait Column | package anorm

Permalink

object Column extends JodaColumn with JavaTimeColumn

Column companion, providing default conversions.

Source
Column.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Column
  2. JavaTimeColumn
  3. JodaColumn
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[A](transformer: (Any, MetaDataItem) ⇒ MayErr[SqlRequestError, A]): Column[A]

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. implicit def columnToArray[T](implicit transformer: Column[T], t: ClassTag[T]): Column[Array[T]]

    Permalink

    Parses column as array.

    Parses column as array.

    val a: Array[String] = SQL"SELECT str_arr FROM tbl".as(scalar[Array[String]]) }}}

  8. implicit val columnToBigInt: Column[BigInt]

    Permalink

    Column conversion to big integer.

    Column conversion to big integer.

    import anorm.SqlParser.scalar
    import anorm.Column.columnToBigInt
    
    val c: BigInt =
      SQL("SELECT COUNT(*) FROM tbl").as(scalar[BigInt].single)
  9. implicit val columnToBigInteger: Column[BigInteger]

    Permalink

    Column conversion to Java big integer.

    Column conversion to Java big integer.

    import anorm.SqlParser.scalar
    import anorm.Column.columnToScalaBigInteger
    
    val c: BigInteger =
      SQL("SELECT COUNT(*) FROM tbl").as(scalar[BigInteger].single)
  10. implicit val columnToBoolean: Column[Boolean]

    Permalink
  11. implicit val columnToByte: Column[Byte]

    Permalink
  12. implicit val columnToByteArray: Column[Array[Byte]]

    Permalink

    Column conversion to bytes array.

    Column conversion to bytes array.

    import anorm.SqlParser.scalar
    import anorm.Column.columnToByteArray
    
    val bytes: Array[Byte] = SQL("SELECT bin FROM tbl").
      as(scalar[Array[Byte]].single)
  13. implicit val columnToChar: Column[Char]

    Permalink

    Column conversion to character.

    Column conversion to character.

    import anorm.SqlParser.scalar
    import anorm.Column.columnToChar
    
    val c: Char = SQL("SELECT char FROM tbl").as(scalar[Char].single)
  14. implicit val columnToDate: Column[Date]

    Permalink

    Parses column as Java Date.

    Parses column as Java Date. Time zone offset is the one of default JVM time zone (see TimeZone.getDefault).

    import java.util.Date
    
    val d: Date = SQL("SELECT last_mod FROM tbl").as(scalar[Date].single)
  15. implicit val columnToDouble: Column[Double]

    Permalink
  16. implicit val columnToFloat: Column[Float]

    Permalink
  17. implicit val columnToInputStream: Column[InputStream]

    Permalink

    Column conversion to bytes array.

    Column conversion to bytes array.

    import anorm.SqlParser.scalar
    import anorm.Column.columnToInputStream
    
    val bytes: InputStream = SQL("SELECT bin FROM tbl").
      as(scalar[InputStream].single)
  18. implicit val columnToInstant: Column[Instant]

    Permalink

    Parses column as Java8 instant.

    Parses column as Java8 instant. Time zone offset is the one of default JVM time zone (see ZoneId.systemDefault).

    import java.time.Instant
    import anorm.Java8._
    
    val i: Instant = SQL("SELECT last_mod FROM tbl").as(scalar[Instant].single)
    Definition Classes
    JavaTimeColumn
  19. implicit val columnToInt: Column[Int]

    Permalink
  20. implicit val columnToJavaBigDecimal: Column[BigDecimal]

    Permalink

    Column conversion to Java big decimal.

    Column conversion to Java big decimal.

    import java.math.{ BigDecimal => JBigDecimal }
    import anorm.SqlParser.scalar
    import anorm.Column.columnToJavaBigDecimal
    
    val c: JBigDecimal =
      SQL("SELECT COUNT(*) FROM tbl").as(scalar[JBigDecimal].single)
  21. implicit val columnToJodaDateTime: Column[DateTime]

    Permalink

    Parses column as joda DateTime

    Parses column as joda DateTime

    import org.joda.time.DateTime
    
    val d: Date = SQL("SELECT last_mod FROM tbl").as(scalar[DateTime].single)
    Definition Classes
    JodaColumn
  22. implicit val columnToJodaInstant: Column[Instant]

    Permalink

    Parses column as joda Instant

    Parses column as joda Instant

    import org.joda.time.Instant
    
    val d: Date = SQL("SELECT last_mod FROM tbl").as(scalar[Instant].single)
    Definition Classes
    JodaColumn
  23. implicit val columnToJodaLocalDate: Column[LocalDate]

    Permalink

    Parses column as Joda local date.

    Parses column as Joda local date. Time zone is the one of default JVM time zone (see DateTimeZone.getDefault).

    import org.joda.time.LocalDate
    
    val i: LocalDate = SQL("SELECT last_mod FROM tbl").
      as(scalar[LocalDate].single)
    Definition Classes
    JodaColumn
  24. implicit val columnToJodaLocalDateTime: Column[LocalDateTime]

    Permalink

    Parses column as Joda local date/time.

    Parses column as Joda local date/time. Time zone is the one of default JVM time zone (see DateTimeZone.getDefault).

    import org.joda.time.LocalDateTime
    
    val i: LocalDateTime = SQL("SELECT last_mod FROM tbl").
      as(scalar[LocalDateTime].single)
    Definition Classes
    JodaColumn
  25. implicit def columnToList[T](implicit transformer: Column[T], t: ClassTag[T]): Column[List[T]]

    Permalink

    Parses column as list.

    Parses column as list.

    val a: List[String] = SQL"SELECT str_arr FROM tbl".as(scalar[List[String]]) }}}

  26. implicit val columnToLocalDate: Column[LocalDate]

    Permalink

    Parses column as Java8 local date.

    Parses column as Java8 local date. Time zone offset is the one of default JVM time zone (see ZoneId.systemDefault).

    import java.time.LocalDateTime
    import anorm.Java8._
    
    val i: LocalDateTime = SQL("SELECT last_mod FROM tbl").
      as(scalar[LocalDateTime].single)
    Definition Classes
    JavaTimeColumn
  27. implicit val columnToLocalDateTime: Column[LocalDateTime]

    Permalink

    Parses column as Java8 local date/time.

    Parses column as Java8 local date/time. Time zone offset is the one of default JVM time zone (see ZoneId.systemDefault).

    import java.time.LocalDateTime
    import anorm.Java8._
    
    val i: LocalDateTime = SQL("SELECT last_mod FROM tbl").
      as(scalar[LocalDateTime].single)
    Definition Classes
    JavaTimeColumn
  28. implicit val columnToLong: Column[Long]

    Permalink
  29. implicit def columnToOption[T](implicit transformer: Column[T]): Column[Option[T]]

    Permalink
  30. implicit val columnToScalaBigDecimal: Column[BigDecimal]

    Permalink

    Column conversion to big decimal.

    Column conversion to big decimal.

    import anorm.SqlParser.scalar
    import anorm.Column.columnToScalaBigDecimal
    
    val c: BigDecimal =
      SQL("SELECT COUNT(*) FROM tbl").as(scalar[BigDecimal].single)
  31. implicit val columnToShort: Column[Short]

    Permalink
  32. implicit val columnToString: Column[String]

    Permalink
  33. implicit val columnToUUID: Column[UUID]

    Permalink
  34. implicit val columnToZonedDateTime: Column[ZonedDateTime]

    Permalink

    Parses column as Java8 zoned date/time.

    Parses column as Java8 zoned date/time. Time zone offset is the one of default JVM time zone (see ZoneId.systemDefault).

    import java.time.ZonedDateTime
    import anorm.Java8._
    
    val i: ZonedDateTime = SQL("SELECT last_mod FROM tbl").
      as(scalar[ZonedDateTime].single)
    Definition Classes
    JavaTimeColumn
  35. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  36. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  37. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  38. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  39. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  40. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  41. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  42. def nonNull1[A](transformer: (Any, MetaDataItem) ⇒ Either[SqlRequestError, A]): Column[A]

    Permalink

    Helper function to implement column conversion.

    Helper function to implement column conversion.

    transformer

    Function converting raw value of column

  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  46. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  47. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def nonNull[A](transformer: (Any, MetaDataItem) ⇒ MayErr[SqlRequestError, A]): Column[A]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.6) Use nonNull1

Inherited from JavaTimeColumn

Inherited from JodaColumn

Inherited from AnyRef

Inherited from Any

Ungrouped