Skip to content

Fix: builder wherein#29

Merged
AxiosLeo merged 3 commits into
mainfrom
fix/builder-wherein
Jun 12, 2026
Merged

Fix: builder wherein#29
AxiosLeo merged 3 commits into
mainfrom
fix/builder-wherein

Conversation

@AxiosLeo

@AxiosLeo AxiosLeo commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Note

High Risk
Changes core WHERE binding for IN and JSON IN-style operators across all query paths; wrong binding previously caused silent empty results in transactions, so behavior changes are intentional but affect every consumer using these conditions.

Overview
Fixes a silent data bug where whereIn / whereNotIn and related IN filters returned no rows (or updated/deleted nothing) inside transactions, while the same queries worked outside transactions.

The SQL Builder now emits one ? per list element and binds flat scalars (via _buildArrayPlaceholders) instead of a single placeholder bound to a nested array. That aligns conn.query and conn.execute (prepared statements on the transaction path).

The same expansion applies to JSON path IN / NOT IN, CONTAIN / NOT CONTAIN, and OVERLAPS / NOT OVERLAPS. Comma-separated strings for IN are split and trimmed like arrays; empty strings still throw like empty arrays.

Release 0.15.2 adds CHANGELOG.md, bumps package/CLI version, and adds regression tests (unit, mocked transaction execute, and a MySQL feature scenario).

Reviewed by Cursor Bugbot for commit bc41700. Bugbot is set up for automated code reviews on this repo. Configure here.

@AxiosLeo AxiosLeo merged commit b844f80 into main Jun 12, 2026
13 checks passed
@AxiosLeo AxiosLeo deleted the fix/builder-wherein branch June 12, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant