Repository navigation
Preserve precise rows for grammar-proven repeated inputs - #229
Merged
Merged
Conversation
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.
Dynamic mapped lists currently widen every result property to SQL-nullable unknown, including an ordinary
WHERE id IN (...)or bulkINSERT ... VALUES ... RETURNING. Preserve the selected grammar's inferred results when its AST proves that every repeated range supplies scalar inputs. PostgreSQL, MySQL, and SQLite certify scalar IN lists in top-level SELECT predicates and scalar VALUES rows. Other placements retain the conservative fallback.The compiler passes SQL ranges through the optional dialect analysis context and keys cached analysis by those ranges as well as SQL text. Identical representative SQL from an input list and a repeated JSON projection therefore cannot share incompatible evidence. RETURNING column locations also map through expanded SQL, preserving editor source navigation.
Delimiter checks now consume each list's closing token explicitly and distinguish punctuation from a closing-parenthesis string literal. Nested calls no longer steal an outer closing token or make a missing delimiter appear valid.
Validation: full
pnpm verifypassed, including coverage, packed consumers and editor type checks, docs contracts/build, performance budgets, and soak checks. The shared three-grammar corpus asserts result types, ordered parameter patterns, diagnostics, and source spans in both compilation modes. Regressions cover both cache orders, actual runtime plan selection at cardinality three, absent evidence, repeated RETURNING projections, literal delimiters, and the existing JSON cardinality counterexamples. Includes package Changesets and documentation.