Repository navigation
Reuse repeated variable bindings for numbered placeholders - #1559
Merged
Merged
Conversation
lovasoa
enabled auto-merge
October 23, 2026 14:20
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.
Repeated variables now share a prepared parameter on native SQL Server, PostgreSQL, and SQLite connections. The SQL Server reproducer uses
@p1in bothSELECTandGROUP BYand returns(0, 2),(1, 2), and(2, 2).Reuse is scoped to one statement and keyed by the variable's name and lookup source. Function calls remain independent, and MySQL/ODBC positional placeholders keep one argument per occurrence. Regression coverage checks generated SQL, binding order, distinct lookup sources, SET changes including NULL, and live SQL Server grouping. Updated the unreleased changelog.
Chart documentation browser tests now wait for all charts to initialize before checking their output. The loading assertion checks every placeholder, avoiding an ambiguous multi-element locator.
Validation:
cargo teston SQLite, SQL Server, PostgreSQL, and MySQL: 248 unit tests and 87 integration tests passed on each.npm test(82 tests),npm run buildcargo fmt --all --checkcargo clippy --all-targets --all-features -- -D warningsFixes #1558.