package anorm

Anorm API

Use the SQL method to start an SQL query

import anorm._

SQL("Select 1")
Linear Supertypes
AnyRef, Any
  1. Alphabetic
  2. By inheritance
  1. anorm
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
  1. Public
  2. All

Type Members

  1. sealed trait BatchSql extends AnyRef

    SQL batch

  2. trait Column[A] extends (Any, MetaDataItem) ⇒ MayErr[SqlRequestError, A]

    Column mapping

  3. case class ColumnName(qualified: String, alias: Option[String]) extends Product with Serializable

  4. case class ColumnNotFound(column: String, possibilities: List[String]) extends SqlRequestError with Product with Serializable

  5. case class Error(msg: SqlRequestError) extends SqlResult[Nothing] with Product with Serializable

    Erroneous result (failure while parsing).

  6. case class Id[ID](id: ID) extends Pk[ID] with Product with Serializable

  7. case class MayErr[+E, +A](toEither: Either[E, A]) extends Product with Serializable

  8. case class MetaDataItem(column: ColumnName, nullable: Boolean, clazz: String) extends Product with Serializable

  9. sealed case class NamedParameter(name: String, value: ParameterValue) extends Product with Serializable

    Applied named parameter.

  10. trait NotNullGuard extends AnyRef

    Marker trait to indicate that even if a type T accept null as value, it must be refused in some Anorm context.

  11. case class Object(value: Any) extends Product with Serializable

    Untyped value wrapper.

  12. sealed trait ParameterValue extends AnyRef

    Prepared parameter value.

  13. trait ResultSetParser[+A] extends (ResultSet) ⇒ SqlResult[A]

  14. trait Row extends AnyRef

  15. trait RowParser[+A] extends (Row) ⇒ SqlResult[A]

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

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

  17. sealed trait SeqParameter[A] extends AnyRef

    Wrapper to use Seq as SQL parameter, with custom formatting.

  18. case class SimpleSql[T](sql: SqlQuery, params: Map[String, ParameterValue], defaultParser: RowParser[T]) extends Sql with Product with Serializable

    Simple/plain SQL.

  19. sealed trait Sql extends AnyRef

  20. case class SqlMappingError(msg: String) extends SqlRequestError with Product with Serializable

  21. class SqlQuery extends Sql with Product with Serializable

    Initial SQL query, without parameter values.

  22. final case class SqlQueryResult(resultSet: ResultSet) extends Product with Serializable

    A result from execution of an SQL query, row data and context (e.

  23. sealed trait SqlRequestError extends AnyRef

    Error from processing SQL

  24. trait SqlResult[+A] extends AnyRef

    Parsed SQL result.

  25. implicit final class SqlStringInterpolation extends AnyVal

    Creates an SQL query using String Interpolation feature.

  26. case class Success[A](a: A) extends SqlResult[A] with Product with Serializable

    Successfully parsed result.

  27. trait ToSql[A] extends AnyRef

    Set value as prepared SQL statement fragment.

  28. trait ToStatement[A] extends AnyRef

    Sets value as statement parameter.

  29. sealed case class TupleFlattener[F](f: F) extends Product with Serializable

  30. sealed trait TupleFlattenerPriority1 extends AnyRef

    Conversion from 2-column tuple-like to scala.Tuple2, with resolution priority 1.

  31. sealed trait TupleFlattenerPriority10 extends TupleFlattenerPriority9

    Conversion from 11-column tuple-like to scala.Tuple11, with resolution priority 10.

  32. sealed trait TupleFlattenerPriority11 extends TupleFlattenerPriority10

    Conversion from 12-column tuple-like to scala.Tuple12, with resolution priority 11.

  33. sealed trait TupleFlattenerPriority12 extends TupleFlattenerPriority11

    Conversion from 13-column tuple-like to scala.Tuple13, with resolution priority 12.

  34. sealed trait TupleFlattenerPriority13 extends TupleFlattenerPriority12

    Conversion from 14-column tuple-like to scala.Tuple14, with resolution priority 13.

  35. sealed trait TupleFlattenerPriority14 extends TupleFlattenerPriority13

    Conversion from 15-column tuple-like to scala.Tuple15, with resolution priority 14.

  36. sealed trait TupleFlattenerPriority15 extends TupleFlattenerPriority14

    Conversion from 16-column tuple-like to scala.Tuple16, with resolution priority 15.

  37. sealed trait TupleFlattenerPriority16 extends TupleFlattenerPriority15

    Conversion from 17-column tuple-like to scala.Tuple17, with resolution priority 16.

  38. sealed trait TupleFlattenerPriority17 extends TupleFlattenerPriority16

    Conversion from 18-column tuple-like to scala.Tuple18, with resolution priority 17.

  39. sealed trait TupleFlattenerPriority18 extends TupleFlattenerPriority17

    Conversion from 19-column tuple-like to scala.Tuple19, with resolution priority 18.

  40. sealed trait TupleFlattenerPriority19 extends TupleFlattenerPriority18

    Conversion from 20-column tuple-like to scala.Tuple20, with resolution priority 19.

  41. sealed trait TupleFlattenerPriority2 extends TupleFlattenerPriority1

    Conversion from 3-column tuple-like to scala.Tuple3, with resolution priority 2.

  42. sealed trait TupleFlattenerPriority20 extends TupleFlattenerPriority19

    Conversion from 21-column tuple-like to scala.Tuple21, with resolution priority 20.

  43. sealed trait TupleFlattenerPriority21 extends TupleFlattenerPriority20

    Conversion from 22-column tuple-like to scala.Tuple22, with resolution priority 21.

  44. sealed trait TupleFlattenerPriority3 extends TupleFlattenerPriority2

    Conversion from 4-column tuple-like to scala.Tuple4, with resolution priority 3.

  45. sealed trait TupleFlattenerPriority4 extends TupleFlattenerPriority3

    Conversion from 5-column tuple-like to scala.Tuple5, with resolution priority 4.

  46. sealed trait TupleFlattenerPriority5 extends TupleFlattenerPriority4

    Conversion from 6-column tuple-like to scala.Tuple6, with resolution priority 5.

  47. sealed trait TupleFlattenerPriority6 extends TupleFlattenerPriority5

    Conversion from 7-column tuple-like to scala.Tuple7, with resolution priority 6.

  48. sealed trait TupleFlattenerPriority7 extends TupleFlattenerPriority6

    Conversion from 8-column tuple-like to scala.Tuple8, with resolution priority 7.

  49. sealed trait TupleFlattenerPriority8 extends TupleFlattenerPriority7

    Conversion from 9-column tuple-like to scala.Tuple9, with resolution priority 8.

  50. sealed trait TupleFlattenerPriority9 extends TupleFlattenerPriority8

    Conversion from 10-column tuple-like to scala.Tuple10, with resolution priority 9.

  51. case class TypeDoesNotMatch(message: String) extends SqlRequestError with Product with Serializable

  52. case class UnexpectedNullableFound(on: String) extends SqlRequestError with Product with Serializable

  53. final case class ~[+A, +B](_1: A, _2: B) extends Product with Serializable

    Columns tuple-like

  54. trait Pk[+ID] extends NotNull


    (Since version 2.3.0) Do not use directly, but consider Id or NotAssigned.

Value Members

  1. object BatchSql

    SQL batch companion

  2. object Column

    Column companion, providing default conversions.

  3. object MayErr extends Serializable

  4. object NamedParameter extends Serializable

    Companion object for applied named parameter.

  5. object NotAssigned extends Pk[Nothing] with Product with Serializable

  6. object ParameterValue

    Value factory for parameter.

  7. object Row

    Companion object for row.

  8. object RowParser

  9. def SQL(stmt: String): SqlQuery

    Creates an SQL query with given statement.

    Creates an SQL query with given statement.


    SQL statement

    val query = SQL("SELECT * FROM Country")
  10. object SeqParameter

    SeqParameter factory

  11. object Sql

  12. object SqlParser

  13. object SqlQuery extends AbstractFunction3[String, List[String], Option[Int], SqlQuery] with Serializable

    Manually implemented so that we can deprecate all the case class methods

  14. object SqlStatementParser extends JavaTokenParsers

    Parser for SQL statement.

  15. object ToSql

    Provided ToSql implementations.

  16. object ToStatement

    Provided conversions to set statement parameter.

  17. object TupleFlattener extends TupleFlattenerPriority21 with Serializable

    Conversions to flatten columns to tuple.

  18. object Useful

  19. object features

    Activable features

  20. implicit def implicitID[ID](id: Id[ID]): ID

  21. implicit def sqlToBatch(sql: SqlQuery): BatchSql

  22. implicit def sqlToSimple(sql: SqlQuery): SimpleSql[Row]

Inherited from AnyRef

Inherited from Any