object Macro
- Alphabetic
- By Inheritance
- Macro
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
ColumnNaming extends (String) ⇒ String
Naming strategy, to map each class property to the corresponding column.
- trait Discriminate extends (String) ⇒ String
- trait DiscriminatorNaming extends (String) ⇒ String
-
case class
ParameterProjection(propertyName: String, parameterName: Option[String] = None) extends Product with Serializable
- propertyName
the name of the class property
- parameterName
the name of for the parameter, if different from the property one, otherwise
None
-
final
class
Placeholder extends AnyRef
Only for internal purposes
Value Members
-
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- 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]]
- def defaultParameters[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[ToParameterList[T]]
-
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
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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]
- def indexedParserImpl[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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]
- Annotations
- @SuppressWarnings()
-
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]
- def namedParserImpl[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[T]
- 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]
- 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]
- 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]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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)
- Annotations
- @SuppressWarnings()
- 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]
- 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]]
- 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]]
-
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 propertynames
.Returns a row parser generated for a case class
T
, getting column values according the propertynames
.- 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")
- Annotations
- @SuppressWarnings()
-
macro
def
parser[T](names: String*): RowParser[T]
Returns a row parser generated for a case class
T
, getting column values according the propertynames
.Returns a row parser generated for a case class
T
, getting column values according the propertynames
.- 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")
- Annotations
- @SuppressWarnings()
-
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 appropriateRowParser[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()
-
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 appropriateRowParser[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()
-
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 appropriateRowParser[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()
-
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 appropriateRowParser[C]
in the implicit scope.The default naming is used.
- T
the type of the type family (either a sealed trait or abstract class)
- 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]]
- def sealedParserImpl1[T](c: Context)(implicit arg0: scala.reflect.macros.whitebox.Context.WeakTypeTag[T]): scala.reflect.macros.whitebox.Context.Expr[RowParser[T]]
- 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]]
- 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]]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
macro
def
toParameters[T](separator: String, projection: ParameterProjection*): ToParameterList[T]
- 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()
-
macro
def
toParameters[T](projection: ParameterProjection*): ToParameterList[T]
- T
the type of case class
import anorm.{ Macro, ToParameterList } // 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()
-
macro
def
toParameters[T](separator: String): ToParameterList[T]
- T
the type of case class
import anorm.{ Macro, ToParameterList } // Bar must be a case class implicit val toParams: ToParameterList[Bar] = Macro.toParameters[Bar](separator = "_")
- separator
the separator used with nested properties
- Annotations
- @SuppressWarnings()
-
macro
def
toParameters[T]: ToParameterList[T]
- T
the type of case class
import anorm.{ Macro, ToParameterList } // Bar must be a case class, or a sealed trait with known subclasses implicit val toParams: ToParameterList[Bar] = Macro.toParameters[Bar]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
macro
def
valueColumn[T <: AnyVal]: Column[T]
Returns a column parser for specified value class.
Returns a column parser for specified value class.
import anorm._ implicit val column: Column[ValueClassType] = Macro.valueColumn[ValueClassType]
- T
the type of the value class
-
macro
def
valueToStatement[T <: AnyVal]: ToStatement[T]
Returns a
ToStatement
for the specified ValueClass.Returns a
ToStatement
for the specified ValueClass.import anorm._ implicit val instance: ToStatement[ValueClassType] = Macro.valueToStatement[ValueClassType]
- T
the type of the value class
-
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
- @native() @throws( ... )
-
object
ColumnNaming
Naming companion
- object Discriminate
- object DiscriminatorNaming
- object ParameterProjection extends Serializable
-
object
Placeholder
Only for internal purposes
Deprecated Value Members
-
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 @SuppressWarnings()
- Deprecated
(Since version 2.5.2) Use namedParserImpl2