The 3 type arguments are : 1) Timestamp : the native JDBC type that will back our custom type (in this case JodaTime's DateTime) 2) The new type we want to support 3) One of the sealed traits defined here : https://github.com/max-l/Squeryl/blob/AST-lifting-overhaul/src/main/scala/org/squeryl/dsl/TypedExpression.scala#L28 This will define the behavior of the new type, we want that in the DSL it behaves like a timestamp, this will for example enable comparison operators (<, >, between, etc...) as well as min, max functions, if we chose TBoolean, then min max is not available, if we chose TBigDecimal (of TFloat), then avg, sum, etc become available.
The 3 type arguments are : 1) Timestamp : the native JDBC type that will back our custom type (in this case JodaTime's DateTime) 2) The new type we want to support 3) One of the sealed traits defined here : https://github.com/max-l/Squeryl/blob/AST-lifting-overhaul/src/main/scala/org/squeryl/dsl/TypedExpression.scala#L28 This will define the behavior of the new type, we want that in the DSL it behaves like a timestamp, this will for example enable comparison operators (<, >, between, etc...) as well as min, max functions, if we chose TBoolean, then min max is not available, if we chose TBigDecimal (of TFloat), then avg, sum, etc become available.
the following are necessary for the AST lifting
the following are necessary for the AST lifting
We define this one here to allow working with Option of our new type, this allso allows the 'nvl' function to work
We define this one here to allow working with Option of our new type, this allso allows the 'nvl' function to work