Skip to content

Releases

v1.44.2

Choose a tag to compare

@huandu huandu released this 25 Nov 04:19

What's Changed

  • [FIX] Treat a backslash as a literal character when scanning standard SQL strings. Placeholders after literals such as ESCAPE '\' 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 inside E'...' strings. Fixes #251 by @mansur-akhmadi in #252
  • [DOC] Clarify that Flavor.Interpolate is 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

Choose a tag to compare

@huandu huandu released this 23 Oct 12:29
9f157da

What's Changed

  • [FIX] Preserve nil values when flattening argument lists, so List keeps SQL NULL arguments 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

Choose a tag to compare

@huandu huandu released this 04 Oct 15:06
a238442

What's Changed

  • [FIX] Round SQLite and Presto timestamps to the millisecond they print by @SashaMIT in #247

New Contributors

Full Changelog: v1.43.0...v1.44.0

v1.43.0

Choose a tag to compare

@huandu huandu released this 21 Aug 13:27
1136e4b

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

Full Changelog: v1.42.0...v1.43.0

v1.42.0

Choose a tag to compare

@huandu huandu released this 19 Jun 19:20

What's Changed

  • [NEW]: AddUSING toDELETE and SKIP LOCKED/NOWAIT toSELECT by @webdaad in #239
  • [FIX]: ILIKE operator 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

Choose a tag to compare

@huandu huandu released this 03 May 13:14
  • [NEW] Add an option NoExpand to 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

Choose a tag to compare

@huandu huandu released this 20 Mar 12:53

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

Choose a tag to compare

@huandu huandu released this 20 Jan 07:45
03c69da

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] Mark OrderBy as "not recommended" rather than deprecated by in #223
  • [FIX] Fix sqlite string interpolation incorrectly uses backslash escapes by @shoriwe in #228
  • [FIX] Update doc on Where to 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

Choose a tag to compare

@huandu huandu released this 10 Oct 08:31

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 OrderByAsc and OrderByDesc to SelectBuilder/UpdateBuilder/DeleteBuilder/UnionBuilder for better readability. The old methods OrderBy/Asc/Desc are marked as deprecated. #214

New Contributors

Full Changelog: v1.37.0...v1.38.0

v1.37.0

Choose a tag to compare

@huandu huandu released this 17 Sep 11:54
044cf35

What's Changed

  • [NEW] Support clone (deep copy) in all builders (#218)
  • [BUG] Fix union limit syntax error with some flavor (#216) Thanks, @zhangyongding
  • [BUG] Support typed nil in interpolation (#213)

Full Changelog: v1.36.0...v1.37.0