A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.playframework.com/documentation/2.5.x/api/scala/anorm/Row.html below:

Row - anorm.Row

  • final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  • final def ##(): Int
    Definition Classes
    AnyRef → Any
  • final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  • def apply[B](position: Int)(implicit c: Column[B]): B

    Returns parsed column.

    Returns parsed column.

    position

    Column position from 1 to n

    c

    Column mapping

    import anorm.Column.columnToString // mapping column to string
    val res: (String, String) = SQL("SELECT * FROM Test").map(row =>
      row(1) -> row(2) // string columns #1 and #2
    )
  • def apply[B](name: String)(implicit c: Column[B]): B

    Returns parsed column.

    Returns parsed column.

    name

    Column name

    c

    Column mapping

    import anorm.Column.columnToString // mapping column to string
    val res: (String, String) = SQL("SELECT * FROM Test").map(row =>
      row("code") -> row("label") // string columns 'code' and 'label'
    )
  • def as[T](parser: RowParser[T]): Try[T]

    Returns row as T.

    Returns row as T.

    import anorm.SqlParser.{ int, str }
    
    val parseOnlyFirstRow =
      SQL"SELECT * FROM Table".withResult(_.map(_.row.as(
        str("foo") ~ int(2) map {
          case a ~ b => b -> a
        })))
    // Either[List[Throwable], Option[Try[(Int, String)]]]
    
    val optionalParseRes =
      parseOnlyFirstRow.right.map(_.flatMap(_.toOption))
      // Either[List[Throwable], Option[(Int, String)]]
    parser

    Row parser

  • final def asInstanceOf[T0]: T0
  • lazy val asList: List[Any]

    Returns row as list of column values.

    Returns row as list of column values.

    // Row first column is string "str", second one is integer 2
    val l: List[Any] = row.asList
    // l == List[Any]("str", 2)
    See also

    #as

  • lazy val asMap: Map[String, Any]

    Returns row as dictionary of value per column name

    Returns row as dictionary of value per column name

    // Row column named 'A' is string "str", column named 'B' is integer 2
    val m: Map[String, Any] = row.asMap
    // l == Map[String, Any]("table.A" -> "str", "table.B" -> 2)
    See also

    #as

  • def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  • def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  • def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  • final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  • def hashCode(): Int
    Definition Classes
    AnyRef → Any
  • final def isInstanceOf[T0]: Boolean
  • final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  • final def notify(): Unit
    Definition Classes
    AnyRef
  • final def notifyAll(): Unit
    Definition Classes
    AnyRef
  • final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  • def toString(): String
    Definition Classes
    AnyRef → Any
  • def unsafeGet[T](rowparser: ⇒ RowParser[T]): T
  • final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

  • RetroSearch is an open source project built by @garambo | Open a GitHub Issue

    Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

    HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4