o

anorm

Macro

object Macro

Source
Macro.scala
Linear Supertypes
AnyRef, Any
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

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

  2. trait Discriminate extends (String) ⇒ String
  3. trait DiscriminatorNaming extends (String) ⇒ String
  4. final class Placeholder extends AnyRef

    Only for internal purposes

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. macro def indexedParser[T]: RowParser[T]

    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.{ Macros, RowParser }
    
    val p: RowParser[YourCaseClass] = Macros.indexedParser[YourCaseClass]
  12. def indexedParserImpl[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. macro def namedParser[T](naming: ColumnNaming): RowParser[T]

    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.{ Macros, RowParser }
    
    val p: RowParser[YourCaseClass] = Macros.namedParser[YourCaseClass]
  15. macro def namedParser[T]: RowParser[T]

    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.{ Macros, RowParser }
    
    val p: RowParser[YourCaseClass] = Macros.namedParser[YourCaseClass]
  16. def namedParserImpl[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]
  17. 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]
  18. 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]
  19. 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]
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. macro def offsetParser[T](offset: Int): RowParser[T]

    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.{ Macros, RowParser }
    
    val p: RowParser[YourCaseClass] = Macros.offsetParser[YourCaseClass](2)
  24. 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]
  25. macro def parser[T](naming: ColumnNaming, names: String*): RowParser[T]

    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.{ Macros, RowParser }
    
    val p: RowParser[YourCaseClass] =
      Macros.parser[YourCaseClass]("foo", "loremIpsum")
  26. macro def parser[T](names: String*): RowParser[T]

    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.{ Macros, RowParser }
    
    val p: RowParser[YourCaseClass] =
      Macros.parser[YourCaseClass]("foo", "bar")
  27. macro def sealedParser[T](naming: DiscriminatorNaming, discriminate: Discriminate): RowParser[T]

    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

  28. macro def sealedParser[T](discriminate: Discriminate): RowParser[T]

    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

  29. macro def sealedParser[T](naming: DiscriminatorNaming): RowParser[T]

    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

  30. macro def sealedParser[T]: RowParser[T]

    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)

  31. 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]]
  32. def sealedParserImpl1[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[RowParser[T]]
  33. 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]]
  34. 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]]
  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toString(): String
    Definition Classes
    AnyRef → Any
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  40. object ColumnNaming

    Naming companion

  41. object Discriminate
  42. object DiscriminatorNaming
  43. object Placeholder

    Only for internal purposes

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]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.2) Use namedParserImpl2

Inherited from AnyRef

Inherited from Any

Ungrouped