DerivingUtil

com.augustnagro.magnum.DerivingUtil$
object DerivingUtil

Not useful for typical user code; provided to help implement custom DbCodecs and associated typeclasses

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def buildSqlNameMapForEnum[E : Type, Mels : Type, Mets : Type](implicit evidence$1: Type[E], evidence$2: Type[Mels], evidence$3: Type[Mets], q: Quotes): Expr[Seq[(String, E)]]

For a Simple (non-ADT) enum type E, constructs a sequence of mappings from sql string representation to enum value. For example,

For a Simple (non-ADT) enum type E, constructs a sequence of mappings from sql string representation to enum value. For example,

 @Table(PostgresDbType, SqlNameMapper.CamelToUpperSnakeCase)
 enum Color { case Red, @SqlName("greeeeeen") Green, Blue }

Results in

 Seq("Red" -> Color.Red, "greeeeeen" -> Color.Green, "Blue" -> Color.Blue)

Will produce a compile error if the enum is not simple (non-adt).

Type parameters

E

the enum type, like Color

Mels

enum Mirror's MirroredElemLabels

Mets

enum Mirror's MirroredElemTypes

Attributes

def sqlTableNameAnnot[T : Type](implicit evidence$9: Type[T], Quotes): Option[Expr[SqlName]]

Finds the first SqlName annotation on type T

Finds the first SqlName annotation on type T

Attributes

def tableAnnot[T : Type](implicit evidence$10: Type[T], Quotes): Option[Expr[Table]]

Finds the first Table annotation on type T

Finds the first Table annotation on type T

Attributes