Object

anorm

Macro

Related Doc: package anorm

Permalink

object Macro

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Macro
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait ColumnNaming extends (String) ⇒ String

    Permalink

    Naming strategy, to map each class property to the corresponding column.

  2. trait Discriminate extends (String) ⇒ String

    Permalink
  3. trait DiscriminatorNaming extends (String) ⇒ String

    Permalink
  4. case class ParameterProjection(propertyName: String, parameterName: Option[String] = None) extends Product with Serializable

    Permalink

    propertyName

    the name of the class property

    parameterName

    the name of for the parameter, if different from the property one, otherwise None

  5. final class Placeholder extends AnyRef

    Permalink

    Only for internal purposes

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. object ColumnNaming

    Permalink

    Naming companion

  5. object Discriminate

    Permalink
  6. object DiscriminatorNaming

    Permalink
  7. object ParameterProjection extends Serializable

    Permalink
  8. object Placeholder

    Permalink

    Only for internal purposes

  9. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def configuredParameters[T](c: Context)(projection: scala.reflect.macros.whitebox.Context.Expr[ParameterProjection]*)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[ToParameterList[T]]

    Permalink
  12. def defaultParameters[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[ToParameterList[T]]

    Permalink
  13. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. macro def indexedParser[T]: RowParser[T]

    Permalink

    Returns a row parser generated for a case class T, getting column values by position.

    Returns a row parser generated for a case class T, getting column values by position.

    T

    the type of case class

    import anorm.{ Macro, RowParser }
    case class YourCaseClass(v: Int)
    val p: RowParser[YourCaseClass] = Macro.indexedParser[YourCaseClass]
  19. def indexedParserImpl[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]

    Permalink
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. macro def namedParser[T](naming: ColumnNaming): RowParser[T]

    Permalink

    Returns a row parser generated for a case class T, getting column values by name.

    Returns a row parser generated for a case class T, getting column values by name.

    T

    the type of case class

    naming

    the column naming, to resolve the column name for each case class property

    import anorm.{ Macro, RowParser }
    case class YourCaseClass(v: Int)
    val p: RowParser[YourCaseClass] = Macro.namedParser[YourCaseClass]
    Annotations
    @SuppressWarnings()
  22. macro def namedParser[T]: RowParser[T]

    Permalink

    Returns a row parser generated for a case class T, getting column values by name.

    Returns a row parser generated for a case class T, getting column values by name.

    T

    the type of case class

    import anorm.{ Macro, RowParser }
    case class YourCaseClass(v: Int)
    val p: RowParser[YourCaseClass] = Macro.namedParser[YourCaseClass]
  23. def namedParserImpl[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]

    Permalink
  24. def namedParserImpl1[T](c: Context)(naming: scala.reflect.macros.whitebox.Context.Expr[ColumnNaming])(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]

    Permalink
  25. def namedParserImpl2[T](c: Context)(names: scala.reflect.macros.whitebox.Context.Expr[String]*)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]

    Permalink
  26. def namedParserImpl3[T](c: Context)(naming: scala.reflect.macros.whitebox.Context.Expr[ColumnNaming], names: scala.reflect.macros.whitebox.Context.Expr[String]*)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]

    Permalink
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  30. macro def offsetParser[T](offset: Int): RowParser[T]

    Permalink

    Returns a row parser generated for a case class T, getting column values by position, with an offset.

    Returns a row parser generated for a case class T, getting column values by position, with an offset.

    T

    the type of case class

    offset

    the offset of column to be considered by the parser

    import anorm.{ Macro, RowParser }
    case class YourCaseClass(v: Int)
    val p: RowParser[YourCaseClass] = Macro.offsetParser[YourCaseClass](2)
    Annotations
    @SuppressWarnings()
  31. def offsetParserImpl[T](c: Context)(offset: scala.reflect.macros.whitebox.Context.Expr[Int])(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]

    Permalink
  32. def parametersDefaultNames[T](c: Context)(separator: scala.reflect.macros.whitebox.Context.Expr[String])(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[ToParameterList[T]]

    Permalink
  33. def parametersWithSeparator[T](c: Context)(separator: scala.reflect.macros.whitebox.Context.Expr[String], projection: scala.reflect.macros.whitebox.Context.Expr[ParameterProjection]*)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[ToParameterList[T]]

    Permalink
  34. macro def parser[T](naming: ColumnNaming, names: String*): RowParser[T]

    Permalink

    Returns a row parser generated for a case class T, getting column values according the property names.

    Returns a row parser generated for a case class T, getting column values according the property names.

    T

    the type of case class

    naming

    the column naming, to resolve the column name for each case class property

    names

    the names of the columns corresponding to the case class properties

    import anorm.{ Macro, RowParser }
    case class YourCaseClass(a: Int, b: String)
    val p: RowParser[YourCaseClass] =
      Macro.parser[YourCaseClass]("foo", "loremIpsum")
    Annotations
    @SuppressWarnings()
  35. macro def parser[T](names: String*): RowParser[T]

    Permalink

    Returns a row parser generated for a case class T, getting column values according the property names.

    Returns a row parser generated for a case class T, getting column values according the property names.

    T

    the type of case class

    names

    the names of the columns corresponding to the case class properties

    import anorm.{ Macro, RowParser }
    case class YourCaseClass(a: Int, b: String)
    val p: RowParser[YourCaseClass] =
      Macro.parser[YourCaseClass]("foo", "bar")
    Annotations
    @SuppressWarnings()
  36. macro def sealedParser[T](naming: DiscriminatorNaming, discriminate: Discriminate): RowParser[T]

    Permalink

    Returns a row parser generated for a sealed class family.

    Returns a row parser generated for a sealed class family. Each direct known subclasses C must be provided with an appropriate RowParser[C] in the implicit scope.

    T

    the type of the type family (either a sealed trait or abstract class)

    naming

    the naming function for the discriminator column

    discriminate

    the discriminating function applied to each name of the family type

    Annotations
    @SuppressWarnings()
  37. macro def sealedParser[T](discriminate: Discriminate): RowParser[T]

    Permalink

    Returns a row parser generated for a sealed class family.

    Returns a row parser generated for a sealed class family. Each direct known subclasses C must be provided with an appropriate RowParser[C] in the implicit scope.

    T

    the type of the type family (either a sealed trait or abstract class)

    discriminate

    the discriminating function applied to each name of the family type

    Annotations
    @SuppressWarnings()
  38. macro def sealedParser[T](naming: DiscriminatorNaming): RowParser[T]

    Permalink

    Returns a row parser generated for a sealed class family.

    Returns a row parser generated for a sealed class family. Each direct known subclasses C must be provided with an appropriate RowParser[C] in the implicit scope.

    T

    the type of the type family (either a sealed trait or abstract class)

    naming

    the naming function for the discriminator column

    Annotations
    @SuppressWarnings()
  39. macro def sealedParser[T]: RowParser[T]

    Permalink

    Returns a row parser generated for a sealed class family.

    Returns a row parser generated for a sealed class family. Each direct known subclasses C must be provided with an appropriate RowParser[C] in the implicit scope.

    The default naming is used.

    T

    the type of the type family (either a sealed trait or abstract class)

  40. def sealedParserImpl[T](c: Context)(naming: scala.reflect.macros.whitebox.Context.Expr[DiscriminatorNaming], discriminate: scala.reflect.macros.whitebox.Context.Expr[Discriminate])(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[RowParser[T]]

    Permalink
  41. def sealedParserImpl1[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[RowParser[T]]

    Permalink
  42. def sealedParserImpl2[T](c: Context)(naming: scala.reflect.macros.whitebox.Context.Expr[DiscriminatorNaming])(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[RowParser[T]]

    Permalink
  43. def sealedParserImpl3[T](c: Context)(discriminate: scala.reflect.macros.whitebox.Context.Expr[Discriminate])(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[RowParser[T]]

    Permalink
  44. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  45. macro def toParameters[T](separator: String, projection: ParameterProjection*): ToParameterList[T]

    Permalink

    T

    the type of case class

    separator

    the separator used with nested properties

    projection

    The optional projection for the properties as parameters; If none, using the all the class properties.

    Annotations
    @SuppressWarnings()
  46. macro def toParameters[T](projection: ParameterProjection*): ToParameterList[T]

    Permalink

    T

    the type of case class

    import anorm.{ Macro, ToParameterList }
    case class Bar(v: Int)
    // Bar must be a case class
    implicit val toParams: ToParameterList[Bar] =
      Macro.toParameters[Bar]()
    projection

    The optional projection for the properties as parameters; If none, using the all the class properties.

    Annotations
    @SuppressWarnings()
  47. macro def toParameters[T](separator: String): ToParameterList[T]

    Permalink

    T

    the type of case class

    import anorm.{ Macro, ToParameterList }
    case class Bar(v: String)
    // Bar must be a case class
    implicit val toParams: ToParameterList[Bar] =
      Macro.toParameters[Bar]("_")
    separator

    the separator used with nested properties

    Annotations
    @SuppressWarnings()
  48. macro def toParameters[T]: ToParameterList[T]

    Permalink

    T

    the type of case class

    import anorm.{ Macro, ToParameterList }
    case class Bar(v: Float)
    // Bar must be a case class, or a sealed trait with known subclasses
    implicit val toParams: ToParameterList[Bar] = Macro.toParameters[Bar]
  49. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  50. macro def valueColumn[T <: AnyVal]: Column[T]

    Permalink

    Returns a column parser for specified value class.

    Returns a column parser for specified value class.

    import anorm._
    
    class ValueClassType(val v: Int) extends AnyVal
    
    implicit val column: Column[ValueClassType] =
      Macro.valueColumn[ValueClassType]
    T

    the type of the value class

  51. macro def valueToStatement[T <: AnyVal]: ToStatement[T]

    Permalink

    Returns a ToStatement for the specified ValueClass.

    Returns a ToStatement for the specified ValueClass.

    import anorm._
    
    class ValueClassType(val i: Int) extends AnyVal
    
    implicit val instance: ToStatement[ValueClassType] =
      Macro.valueToStatement[ValueClassType]
    T

    the type of the value class

  52. final def wait(): Unit

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

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

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

Deprecated Value Members

  1. def namedParserImpl_[T](c: Context)(names: scala.reflect.macros.whitebox.Context.Expr[String]*)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]

    Permalink
    Annotations
    @deprecated @SuppressWarnings()
    Deprecated

    (Since version 2.5.2) Use namedParserImpl2

Inherited from AnyRef

Inherited from Any

Ungrouped