Quill v3.6.0 Release Notes
-
This description is an aggregation of the 3.6.0-RC1, RC2 and RC3 as well as several new items.
- Quat Enhancements to Support Needed Spark Use Cases
- Add support for scala 2.13 to quill-cassandra-lagom
- Change all Quat fields to Lazy
- Smart serialization based on number of Quat fields
- Better Dynamic Query DSL For Quats on JVM
- Fix incorrect Quat.Value parsing issues
- Fix Query in Nested Operation and Infix
- Fix Logic table, replicate Option.getOrElse optimization to Boolean Quats
- Fixes + Enhancements to Boolean Optional APIs
- Fix for Boolean Quat Issues
Migration Notes:
- The Cassandra base UDT class
io.getquill.context.cassandra.Udt
has been moved toio.getquill.Udt
. - When working with databases which do not support boolean literals (SQL Server, Oracle, etc...) infixes representing booleans will be converted to equality-expressions.
For example:
query[Person].filter(p => infix"isJoe(p.name)".as[Boolean]) // SELECT ... FROM Person p WHERE isJoe(p.name) // Becomes> SELECT ... FROM Person p WHERE 1 = isJoe(p.name)
This is because the aforementioned databases not not directly support boolean literals (i.e. true/false) or expressions that yield them.
In some cases however, it is desirable for the above behavior not to happen and for the whole infix statement to be treated as an expression. For example
query[Person].filter(p => infix"${p.age} > 21".as[Boolean]) // We Need This> SELECT ... FROM Person p WHERE p.age > 21 // Not This> SELECT ... FROM Person p WHERE 1 = p.age > 21
In order to have this behavior, instead of
infix"...".as[Boolean]
, useinfix"...".asCondition
.query[Person].filter(p => infix"${p.age} > 21".asCondition) // We Need This> SELECT ... FROM Person p WHERE p.age > 21
If the condition represents a pure function, be sure to use
infix"...".pure.asCondition
.