anorm

ScalarRowParser

sealed trait ScalarRowParser[+A] extends RowParser[A]

Parser for scalar row (row of one single column).

Source
SqlParser.scala
Linear Supertypes
RowParser[A], (Row) ⇒ SqlResult[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ScalarRowParser
  2. RowParser
  3. Function1
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(v1: Row): SqlResult[A]

    Definition Classes
    Function1

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def *: ResultSetParser[List[A]]

    Returns possibly empty list parsed from result.

    Returns possibly empty list parsed from result.

    val price = 125
    SQL"SELECT name FROM item WHERE price < $price".as(scalar[String].*)
    Definition Classes
    RowParser
  5. def +: ResultSetParser[List[A]]

    Returns non empty list parse from result, or raise error if there is no result.

    Returns non empty list parse from result, or raise error if there is no result.

    import anorm.SQL
    import anorm.SqlParser.str
    
    val parser = str("title") ~ str("descr")
    SQL("SELECT title, descr FROM pages").as(parser.+) // at least 1 page
    Definition Classes
    RowParser
  6. def <~[B](p: RowParser[B]): RowParser[A]

    Definition Classes
    RowParser
  7. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  9. def >>[B](f: (A) ⇒ RowParser[B]): RowParser[B]

    Definition Classes
    RowParser
  10. def ?: RowParser[Option[A]]

    Returns a row parser for optional column, that will turn missing or null column as None.

    Returns a row parser for optional column, that will turn missing or null column as None.

    Definition Classes
    RowParser
  11. def andThen[A](g: (SqlResult[A]) ⇒ A): (Row) ⇒ A

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  12. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def collect[B](otherwise: String)(f: PartialFunction[A, B]): RowParser[B]

    Returns parser which collects information from already parsed row data using f.

    Returns parser which collects information from already parsed row data using f.

    otherwise

    Message returned as error if nothing can be collected using f.

    f

    Collecting function

    Definition Classes
    RowParser
  15. def compose[A](g: (A) ⇒ Row): (A) ⇒ SqlResult[A]

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  16. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def flatMap[B](k: (A) ⇒ RowParser[B]): RowParser[B]

    Definition Classes
    RowParser
  20. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  23. def map[B](f: (A) ⇒ B): RowParser[B]

    Definition Classes
    RowParser
  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. def single: ResultSetParser[A]

    Returns a result set parser expecting exactly one row to parse.

    Returns a result set parser expecting exactly one row to parse.

    val b: Boolean = SQL("SELECT flag FROM Test WHERE id = :id").
    on("id" -> 1).as(scalar[Boolean].single)
    Definition Classes
    RowParser
  28. def singleOpt: ResultSetParser[Option[A]]

    Returns a result set parser for none or one parsed row.

    Returns a result set parser for none or one parsed row.

    val name: Option[String] =
    SQL("SELECT name FROM Country WHERE lang = :lang")
    .on("lang" -> "notFound").as(scalar[String].singleOpt)
    Definition Classes
    ScalarRowParserRowParser
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    Function1 → AnyRef → Any
  31. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def |[B >: A](p: RowParser[B]): RowParser[B]

    Definition Classes
    RowParser
  35. def ~[B](p: RowParser[B]): RowParser[~[A, B]]

    Definition Classes
    RowParser
  36. def ~>[B](p: RowParser[B]): RowParser[B]

    Definition Classes
    RowParser

Inherited from RowParser[A]

Inherited from (Row) ⇒ SqlResult[A]

Inherited from AnyRef

Inherited from Any

Ungrouped