Package

anorm

Permalink

package anorm

Anorm API

Use the SQL method to start an SQL query

import anorm._

SQL("Select 1")
Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. anorm
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class AnormException(message: String) extends Exception with NoStackTrace with Product with Serializable

    Permalink

    Anorm runtime exception

  2. sealed trait BatchSql extends AnyRef

    Permalink

    SQL batch

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

    Permalink

    Column mapping

    Column mapping

    Annotations
    @implicitNotFound( ... )
  4. trait ColumnAliaser extends Function[(Int, ColumnName), Option[String]]

    Permalink

    Allows to define or overwrite the alias for a column.

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

    Permalink

    qualified

    the qualified column name

    alias

    the column alias

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

    Permalink

    Error raised when the specified column cannot be found in results.

    Error raised when the specified column cannot be found in results.

    column

    the name of the not found column

    possibilities

    the names of the available columns

  7. sealed trait Cursor extends AnyRef

    Permalink

    Result cursor

  8. final class DefaultParameterValue[A] extends ParameterValue with Wrapper[A]

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

    Permalink

    Erroneous result (failure while parsing).

  10. sealed trait JavaTimeColumn extends AnyRef

    Permalink
  11. sealed trait JavaTimeParameterMetaData extends AnyRef

    Permalink
  12. sealed trait JavaTimeToStatement extends AnyRef

    Permalink
  13. sealed trait JodaColumn extends AnyRef

    Permalink
  14. sealed trait JodaToStatement extends AnyRef

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

    Permalink

    column

    the name of the column

    nullable

    true if the column is nullable

    clazz

    the class of the JDBC column value

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

    Permalink

    Applied named parameter.

  17. trait NotNullGuard extends AnyRef

    Permalink

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

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

    Permalink

    Untyped value wrapper.

    Untyped value wrapper.

    SQL("UPDATE t SET val = {o}").on('o -> anorm.Object(val))
  19. trait ParameterMetaData[T] extends AnyRef

    Permalink

    Parameter meta data for type T

    Parameter meta data for type T

    Annotations
    @implicitNotFound( ... )
  20. sealed trait ParameterValue extends Show

    Permalink

    Prepared parameter value.

    Prepared parameter value.

    Annotations
    @implicitNotFound( ... )
  21. sealed trait ResultSetParser[+A] extends (Option[Cursor]) ⇒ SqlResult[A]

    Permalink

    Parses result from the cursor.

  22. trait Row extends AnyRef

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

    Permalink
  24. sealed trait ScalarRowParser[+A] extends RowParser[A]

    Permalink

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

  25. sealed trait SeqParameter[A] extends AnyRef

    Permalink

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

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

    SQL("SELECT * FROM t WHERE %s").
      on(SeqParameter(Seq("a", "b"), " OR ", Some("cat = ")))
    // Will execute as:
    // SELECT * FROM t WHERE cat = 'a' OR cat = 'b'
  26. trait Show extends AnyRef

    Permalink

    Typeclass for string representation

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

    Permalink

    Simple/plain SQL.

  28. case class SqlMappingError(reason: String) extends SqlRequestError with Product with Serializable

    Permalink
  29. sealed trait SqlQuery extends AnyRef

    Permalink

    Initial SQL query, without parameter values.

  30. final case class SqlQueryResult(resultSet: ManagedResource[ResultSet], resultSetOnFirstRow: Boolean = false) extends WithResult with Product with Serializable

    Permalink

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

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

    resultSet

    Result set from executed query

  31. sealed trait SqlRequestError extends AnyRef

    Permalink

    Error from processing SQL

  32. sealed trait SqlResult[+A] extends AnyRef

    Permalink

    Parsed SQL result.

  33. implicit final class SqlStringInterpolation extends AnyVal

    Permalink

    Creates an SQL query using String Interpolation feature.

    Creates an SQL query using String Interpolation feature. It is a 1-step alternative for SQL("...").on(...) functions.

    SQL"""
      UPDATE computer SET name = \${computer.name},
      introduced = \${computer.introduced},
      discontinued = \${computer.discontinued},
      company_id = \${computer.companyId}
      WHERE id = \$id
    """.executeUpdate()
  34. final class StringShow extends Show

    Permalink
  35. type StringWrapper2 = AnyRef { def stringValue: String }

    Permalink

    Structural type for oracle.sql.ROWID wrapper.

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

    Permalink

    Successfully parsed result.

  37. type TimestampWrapper1 = AnyRef { def getTimestamp: java.sql.Timestamp }

    Permalink

    Structural type for timestamp wrapper.

  38. type TimestampWrapper2 = AnyRef { def timestampValue: java.sql.Timestamp }

    Permalink

    Structural type for oracle.sql.TIMESTAMP wrapper.

  39. trait ToSql[A] extends AnyRef

    Permalink

    Set value as prepared SQL statement fragment.

    Set value as prepared SQL statement fragment.

    Annotations
    @implicitNotFound( ... )
  40. trait ToStatement[A] extends AnyRef

    Permalink

    Sets value as statement parameter.

    Sets value as statement parameter.

    Annotations
    @implicitNotFound( ... )
  41. sealed trait ToStatementPriority0 extends AnyRef

    Permalink
  42. sealed trait ToStatementPriority1 extends ToStatementPriority0

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

    Permalink
  44. sealed trait TupleFlattenerPriority1 extends AnyRef

    Permalink

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

  45. sealed trait TupleFlattenerPriority10 extends TupleFlattenerPriority9

    Permalink

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

  46. sealed trait TupleFlattenerPriority11 extends TupleFlattenerPriority10

    Permalink

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

  47. sealed trait TupleFlattenerPriority12 extends TupleFlattenerPriority11

    Permalink

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

  48. sealed trait TupleFlattenerPriority13 extends TupleFlattenerPriority12

    Permalink

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

  49. sealed trait TupleFlattenerPriority14 extends TupleFlattenerPriority13

    Permalink

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

  50. sealed trait TupleFlattenerPriority15 extends TupleFlattenerPriority14

    Permalink

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

  51. sealed trait TupleFlattenerPriority16 extends TupleFlattenerPriority15

    Permalink

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

  52. sealed trait TupleFlattenerPriority17 extends TupleFlattenerPriority16

    Permalink

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

  53. sealed trait TupleFlattenerPriority18 extends TupleFlattenerPriority17

    Permalink

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

  54. sealed trait TupleFlattenerPriority19 extends TupleFlattenerPriority18

    Permalink

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

  55. sealed trait TupleFlattenerPriority2 extends TupleFlattenerPriority1

    Permalink

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

  56. sealed trait TupleFlattenerPriority20 extends TupleFlattenerPriority19

    Permalink

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

  57. sealed trait TupleFlattenerPriority21 extends TupleFlattenerPriority20

    Permalink

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

  58. sealed trait TupleFlattenerPriority3 extends TupleFlattenerPriority2

    Permalink

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

  59. sealed trait TupleFlattenerPriority4 extends TupleFlattenerPriority3

    Permalink

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

  60. sealed trait TupleFlattenerPriority5 extends TupleFlattenerPriority4

    Permalink

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

  61. sealed trait TupleFlattenerPriority6 extends TupleFlattenerPriority5

    Permalink

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

  62. sealed trait TupleFlattenerPriority7 extends TupleFlattenerPriority6

    Permalink

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

  63. sealed trait TupleFlattenerPriority8 extends TupleFlattenerPriority7

    Permalink

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

  64. sealed trait TupleFlattenerPriority9 extends TupleFlattenerPriority8

    Permalink

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

  65. case class TypeDoesNotMatch(reason: String) extends SqlRequestError with Product with Serializable

    Permalink
  66. case class UnexpectedNullableFound(reason: String) extends SqlRequestError with Product with Serializable

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

    Permalink

    Columns tuple-like

Value Members

  1. object BatchSql

    Permalink

    SQL batch companion

  2. object Column extends JodaColumn with JavaTimeColumn

    Permalink

    Column companion, providing default conversions.

  3. object ColumnAliaser

    Permalink
  4. object ColumnNotFound extends Serializable

    Permalink
  5. object Cursor

    Permalink

    Cursor companion

  6. object JodaParameterMetaData

    Permalink

    Meta data for Joda parameters

  7. object Macro

    Permalink

  8. object NamedParameter extends Serializable

    Permalink

    Companion object for applied named parameter.

  9. object ParameterMetaData extends JavaTimeParameterMetaData

    Permalink

    ParameterMetaData companion, providing defaults based on SQL92.

  10. object ParameterValue

    Permalink

    Value factory for parameter.

    Value factory for parameter.

    val param = ParameterValue("str", null, setter)
    
    SQL("...").onParams(param)
  11. object ResultSetResource extends Resource[ResultSet]

    Permalink
  12. object Row

    Permalink

    Companion object for row.

  13. object RowParser

    Permalink
  14. def SQL(stmt: String): SqlQuery

    Permalink

    Creates an SQL query with given statement.

    Creates an SQL query with given statement.

    stmt

    SQL statement

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

    Permalink

    SeqParameter factory

  16. object Show

    Permalink
  17. object SimpleSql extends Serializable

    Permalink
  18. object Sql

    Permalink
  19. object SqlParser extends FunctionAdapter

    Permalink
  20. object SqlQuery

    Permalink
  21. object SqlStatementParser extends JavaTokenParsers

    Permalink

    Parser for SQL statement.

  22. object StatementResource extends Resource[PreparedStatement]

    Permalink
  23. object StringWrapper2

    Permalink
  24. object TimestampWrapper1

    Permalink
  25. object TimestampWrapper2

    Permalink
  26. object ToSql

    Permalink

    Provided ToSql implementations.

  27. object ToStatement extends ToStatementPriority1 with JodaToStatement with JavaTimeToStatement

    Permalink

    Provided conversions to set statement parameter.

  28. object TokenGroup extends AbstractFunction2[List[StatementToken], Option[String], TokenGroup] with Serializable

    Permalink
  29. object TupleFlattener extends TupleFlattenerPriority21 with Serializable

    Permalink

    Conversions to flatten columns to tuple.

  30. object features

    Permalink

    Activable features

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

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped