Changelog History
Page 4
-
v3.6-RC2 Changes
Migration Notes:
- 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
. -
v3.6.0-RC1 Changes
- 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:
- This realease is not binary compatible with any Quill version before 3.5.3.
- Any code generated by the Quill Code Generator with
quote { ... }
blocks will have to be regenerated with this Quill version if generated before 3.5.3. In most SQL dialects (i.e. everything except Postgres) boolean literals and expressions yielding them are not supported so statements such as
SELECT foo=bar FROM ...
are not supported. In order to get equivalent logic, it is necessary to user case-statements e.g.SELECT CASE WHERE foo=bar THEN 1 ELSE 0`.
On the other hand, in a WHERE-clause, it is the opposite:
SELECT ... WHERE CASE WHEN (...) foo ELSE bar`
is invalid and needs to be rewritten. Naively, a
1=
could be inserted:SELECT ... WHERE 1 = (CASE WHEN (...) foo ELSE bar)
Note that this behavior can disabled via the
-Dquill.query.smartBooleans
switch when issued during compile-time for compile-time queries and during runtime for runtime queries.Additionally, in certain situations, it is far more preferable to express this without the
CASE WHEN
construct:SELECT ... WHERE ((...) && foo) || !(...) && foo
This is because CASE statements in SQL are not sargable and generally cannot be well optimized.
A large portion of the Quill DSL has been moved outside of QueryDsl into the top level under the
io.getquill
package. Due to this change, it may be necessary to importio.getquill.Query
if you are not already importingio.getquill._
.
-
v3.5.3 Changes
๐ Please skip this release and proceed directly to the 3.6.0-RC line. This release was originally a test-bed for the new Quats-based functionality which was supposed to be a strictly internal mechanism. Unfortunately multiple issues were found. They will be addressed in the 3.6.X line.
- Adding Quill-Application-Types (Quats) to AST
- Translate boolean literals
- breakdown caseclasses in groupBy clause
- allowed distinct to be placed on an infix
- Change Subquery Expansion to be Quat-based
- Use quats to expand nested queries in Spark
- ๐ Fixed bug where alias of filter clause did not match alias of inner query.
- 0๏ธโฃ Add default implementations so Query can be more easily inherited from Dotty
- Monix streaming with NDBC
- Fix SqlServer snake case - OUTPUT i_n_s_e_r_t_e_d.id
Migration Notes:`
- Quill 3.5.3 is source-compatible but not binary-compatible with Quill 3.5.2.
- Any code generated by the Quill Code Generator with
quote { ... }
blocks will have to be regenerated with Quill 3.5.3 as the AST has substantially changed. - The implementation of Quill Application Types (Quats) has changed the internals of nested query expansion. Queries
with a
querySchema
or aschemaMeta
will be aliased between nested clauses slightly differently. Given:case class Person(firstName:String, lastName:String) val ctx = new SqlMirrorContext(PostgresDialect, Literal)
Before:SELECT x.first_name, x.last_name FROM ( SELECT x.first_name, x.last_name FROM person x) AS x
After:SELECT x.firstName, x.lastName FROM ( SELECT x.first_name AS firstName, x.last_name AS lastName FROM person x) AS x
Note however that the semantic result of the queries should be the same. No user-level code change for this should be required.
-
v3.5.2 Changes
- ๐ Add support jasync-sql for postgres
- Add quill-jasync-mysql
- Delete returning
- Fix SqlServer snake case - OUTPUT i_n_s_e_r_t_e_d.id
- Add translate to NDBC Context
- Apply NamingStrategy after applying prefix
- ๐ Remove use of
Row#getAnyOption
fromFinaglePostgresDecoders
- ๐ Better error message about lifting for enum types
- More 2.13 modules
Migration Notes:
- Much of the content in
QueryDsl
has been moved to the top-level for better portability with the upcoming Dotty implementation. This means that things likeQuery
are no longer part ofContext
but now are directly in the ๐ฆio.getquill
package. If you are importingio.getquill._
your code should be unaffected. - Custom decoders written for Finalge Postgres no longer require a
ClassTag
.
-
v3.4.8 Changes
- ๐ Additional Fixes for Embedded Entities in Nested Queries
- Fix java.sql.SQLException corner case
- ๐ Feature/local time support
- โก๏ธ Update monix-eval, monix-reactive to 3.0.0
๐ Documentation Updates:
Migration Notes:
- Monix 3.0.0 is not binary compatible with 3.0.0-RC3 which was a dependency of Quill 3.4.7. โก๏ธ If you are using the Quill Monix modules, please update your dependencies accordingly.