Repository navigation
Releases
v1.44.2
What's Changed
[FIX]Treat a backslash as a literal character when scanning standard SQL strings. Placeholders after literals such asESCAPE '\'are now interpolated correctly in SQLite, PostgreSQL, SQL Server, Oracle, CQL, Presto and Informix, while MySQL, ClickHouse and Doris keep their backslash-escape behavior. PostgreSQL backslashes are only escapes insideE'...'strings. Fixes #251 by @mansur-akhmadi in #252[DOC]Clarify thatFlavor.Interpolateis a best-effort simulation of each dialect's default syntax and does not model non-default server settings.
Full Changelog: v1.44.1...v1.44.2
v1.44.1
What's Changed
[FIX]Preservenilvalues when flattening argument lists, soListkeeps SQLNULLarguments by @yuefdev in #250[FIX]Support underscores and digits in PostgreSQL dollar-quote tags, and avoid treating dollar signs inside identifiers as quote delimiters by @yuefdev in #249
New Contributors
Full Changelog: v1.44.0...v1.44.1
v1.44.0
v1.43.0
What's Changed
[FIX]Interpolate: keep ClickHouse whole-number floats and non-finite values typed correctly by @youdie006 in #244[FIX]Escape ANSI interpolation string literals in #246[FIX]Escape identifier delimiters in Flavor.Quote in #245
New Contributors
- @youdie006 made their first contribution in #244
- @KrisKennawayDD addressed two CVE issues
Full Changelog: v1.42.0...v1.43.0
v1.42.0
What's Changed
[NEW]: AddUSINGtoDELETEandSKIP LOCKED/NOWAITtoSELECTby @webdaad in #239[FIX]:ILIKEoperator is supported by ClickHouse but not Sqlite. Issue was raised by @NAlexandrov in #240
New Contributors
Full Changelog: v1.41.0...v1.42.0
v1.41.0
[NEW]Add an optionNoExpandto change default field "expand" behavior for backward compatibility. See #237 for details.
NOTE: Starting from v1.40.0, the Struct utility type defaults to expanding non-primitive struct fields. This change caused unexpected behavior for some users. To address this without reverting the features introduced in v1.40.0, we have introduced a NoExpand configuration. When set to true, all fields will default to no expansion (preserving legacy behavior). You can still opt-in to expansion for specific fields by using the fieldopt:"expand" tag.
Full Changelog: v1.40.0...v1.41.0
v1.40.0
What's new
Struct field / db tag improvements
Support treating a db tag on a struct-typed field as a database alias and expanding its exported fields as aliased columns. This makes it possible to build JOIN projections like post.id, post.title, etc., from a nested struct field and keeps Addr/Scan behavior working by allocating nested pointers when scanning.
Note: This change preserves existing semantics for scalar-like structs (types implementing sql.Scanner/driver.Valuer/time.Time, etc) — they are not expanded.
See issue #233 for more details.
Oracle SELECT behavior
Use OFFSET ... FETCH pattern for Oracle SELECT pagination.
Potential Oracle compatibility note: the change to use OFFSET ... FETCH for Oracle pagination may affect environments using older Oracle versions that do not support this syntax. Please verify compatibility with your Oracle version before upgrading.
Thanks and acknowledgements
Thanks to @zhangyongding for the Oracle pagination improvements.
Full Changelog: v1.39.0...v1.40.0
v1.39.0
What's Changed
[NEW]Add From support for UpdateBuilder by @stvnkiss in #230[FIX]Fix oracle limit bug by @zhangyongding in #222[FIX]Improve error-msg context for unsupported types during interpolation by @shoriwe in #226[FIX]MarkOrderByas "not recommended" rather than deprecated by in #223[FIX]Fix sqlite string interpolation incorrectly uses backslash escapes by @shoriwe in #228[FIX]Update doc onWhereto avoid confusion in #229
New Contributors
- @zhangyongding made their first contribution in #222
- @shoriwe made their first contribution in #226
- @stvnkiss made their first contribution in #230
Full Changelog: v1.38.0...v1.39.0
v1.38.0
What's Changed
- [NEW] Implement returning method on SQL Server by @Bugadinho in #220
- [FIX] Add document to demonstrate how to write nested
JOIN. #217 - [NEW] Add
OrderByAscandOrderByDesctoSelectBuilder/UpdateBuilder/DeleteBuilder/UnionBuilderfor better readability. The old methodsOrderBy/Asc/Descare marked as deprecated. #214
New Contributors
- @Bugadinho made their first contribution in #220
Full Changelog: v1.37.0...v1.38.0