Skip to content

v1.44.3

Choose a tag to compare

@huandu huandu released this 03 Dec 08:47
· 4 commits to master since this release

This patch release merges five fixes from @Twiink and cleans up the new regression tests.

Fixes

  • #253 BuildWithFlavor now selects the multi-row INSERT syntax from the requested flavor instead of the builder's stored flavor. Cross-flavor builds no longer mix Oracle INSERT ALL with ? placeholders or MySQL multi-row VALUES with :n placeholders.
  • #254 Standalone Cond named arguments now account for the argument index base when looking up values. Reusing a sql.Named value no longer binds nil or emits an unexpected positional placeholder.
  • #255 CopyWhereClause now copies each clause's expression slice. Appending to the original or the copy no longer silently changes the other's SQL and arguments.
  • #256 SQL appended after RETURNING on a SQL Server DELETE is preserved, restoring OUTPUT DELETED.id INTO ... before WHERE.
  • #257 Automatically referenced CTEs are placed in USING for PostgreSQL DELETE instead of the target list. The previous DELETE FROM a, b output is invalid PostgreSQL syntax; the generated DELETE FROM a USING b form was verified against PostgreSQL 17.10. This changes generated SQL for PostgreSQL CTE-based deletes.

Tests

All newly added regression tests were rewritten to use go-assert, matching the rest of the suite. go test, go vet and go test -race pass.