Fix: builder wherein#29
Merged
Merged
Conversation
…to enhance query flexibility
…sactions, ensuring correct placeholder expansion and value binding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/whereNotInand relatedINfilters returned no rows (or updated/deleted nothing) inside transactions, while the same queries worked outside transactions.The SQL
Buildernow emits one?per list element and binds flat scalars (via_buildArrayPlaceholders) instead of a single placeholder bound to a nested array. That alignsconn.queryandconn.execute(prepared statements on the transaction path).The same expansion applies to JSON path
IN/NOT IN,CONTAIN/NOT CONTAIN, andOVERLAPS/NOT OVERLAPS. Comma-separated strings forINare 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 transactionexecute, 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.