Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
label: Versions
description: sqlx, Go, the driver and the database, each with its version
placeholder: sqlx v1.4.2, go1.27.2, lib/pq v1.10.9, PostgreSQL 16
placeholder: sqlx v1.4.3, go1.27.2, lib/pq v1.10.9, PostgreSQL 16
validations:
required: true
- type: textarea
Expand Down
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Notable changes to this fork, newest first. An entry that imports an upstream
pull request names its number and author. Releases up to v1.4.0 are releases of
upstream [jmoiron/sqlx](https://github.com/jmoiron/sqlx).

## Unreleased
## v1.4.3 (2026-10-20)

No API change. Batch inserts report an unclosed `VALUES (` group instead of
producing SQL the database rejects, and expand correctly when the group holds a
bracket inside a string literal or comment.

### Fixes

Expand All @@ -13,11 +17,12 @@ upstream [jmoiron/sqlx](https://github.com/jmoiron/sqlx).
`missing closing bracket in VALUES`, whatever the number of rows. Before, the
query came back unexpanded with every row's arguments, and the mistake only
surfaced when the database rejected the argument count. Single-struct and map
arguments are unchanged.
arguments are unchanged (#36).
- The batch insert expansion skips brackets inside string literals, quoted
identifiers and comments. `VALUES (:a, ')')` or `VALUES (:a, /* ) */ :b)`
with several rows used to be cut at the bracket inside the literal or comment
and expanded into invalid SQL; `VALUES (:a, '(')` was not expanded at all.
and expanded into invalid SQL; `VALUES (:a, '(')` was not expanded at all
(#36).

## v1.4.2 (2026-10-19)

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ and go from query to struct in one call with `Get` and `Select`.

| | jmoiron/sqlx | secondwindoss/sqlx |
|--------------------|------------------------------|-----------------------------------|
| Last release | v1.4.0, April 2024 | v1.4.2, October 2026 |
| Last release | v1.4.0, April 2024 | v1.4.3, October 2026 |
| Last commit | May 2024 | active |
| Open pull requests | 79 (October 2026) | 0, the fixes are merged |
| Go support | `go 1.10`, untested | Go 1.24 and newer, tested |
| API | | identical, checked by `apidiff` |

## Quick start

go get github.com/secondwindoss/sqlx@v1.4.2
go get github.com/secondwindoss/sqlx@v1.4.3

sqlx requires Go 1.24 or newer.

Expand Down Expand Up @@ -109,20 +109,20 @@ Rewrite the import path, then update the dependency.
macOS:

grep -rl 'github.com/jmoiron/sqlx' --include='*.go' . | xargs sed -i '' 's#github.com/jmoiron/sqlx#github.com/secondwindoss/sqlx#g'
go get github.com/secondwindoss/sqlx@v1.4.2
go get github.com/secondwindoss/sqlx@v1.4.3
go mod tidy

Linux:

grep -rl 'github.com/jmoiron/sqlx' --include='*.go' . | xargs sed -i 's#github.com/jmoiron/sqlx#github.com/secondwindoss/sqlx#g'
go get github.com/secondwindoss/sqlx@v1.4.2
go get github.com/secondwindoss/sqlx@v1.4.3
go mod tidy

Tags up to v1.4.0 are upstream's and declare the upstream module path, so
v1.4.1 is the first version that resolves under the new path; v1.4.2 retracts
the older tags so the go command no longer offers them.

A `replace github.com/jmoiron/sqlx => github.com/secondwindoss/sqlx v1.4.2`
A `replace github.com/jmoiron/sqlx => github.com/secondwindoss/sqlx v1.4.3`
directive does not work: the fork imports its own `reflectx` package under
the new path, and Go refuses to use one module under two paths. Rewrite the
imports instead.
Expand Down
Loading