The most notable and honorable of functions in this file, this is what allows our DSL to provide type-safety.
The most notable and honorable of functions in this file, this is what allows our DSL to provide type-safety. It works by requiring a user to define a type-safe mapping between a buffered Result and the above refined Record.
Objects delimiting pre-defined columns also have a pre-defined "apply" method, allowing the user to simply autofill the type-safe mapping by using pre-existing definitions.
The row incoming as a result from a MySQL query.
A Record instance.
The basic wrapper definition of an SQL table. This will force greedy initialisation of all column object members and provide a way to map the basic DSL table definition into a user defined Scala case class.
Greedy object initialisation is done in a thread safe way via a global lock acquired on a singleton case object, preventing race conditions on multiple threads accessing the same table during initialisation.
Unlike the Java reflection API, which cannot guarantee any ordering in a compiled bytecode file of object members, the Scala reflection API is capable of extracting objects in the order the user writes them inside a table definition. This is a very important guarantee allowing for consistency throughout the DSL and auto-generating table schemas where order is important.
The Owner type of the table, pointing to the extending class defining a table. Used as follows: class SomeTable extends Table[SomeTable, SomeRecord]
The user defined Scala class, usually a case class, holding a type safe data model definition. This allows for type safe querying of records, as all select all queries will return an instance of Record.