Skip to content

fix(parser): SQLite $name parameters (P0 Forge compat)#1

Closed
KarataevDmitry wants to merge 4 commits into
mainfrom
fix/sqlite-dollar-named-parameters
Closed

fix(parser): SQLite $name parameters (P0 Forge compat)#1
KarataevDmitry wants to merge 4 commits into
mainfrom
fix/sqlite-dollar-named-parameters

Conversation

@KarataevDmitry

Copy link
Copy Markdown
Member

Summary

  • Add PARAM_DOLLAR_NAMED in WitSQL lexer/parser (distinct from numbered).
  • ParameterType.DollarNamed through visitor, evaluator, and serializer.
  • Preserve @ / : / $ prefixes in engine parameter binding (WitSqlParameterKeys) so ADO `` maps correctly.
  • Tests: parser, evaluator, engine e2e, ADO command (Forge __EFMigrationsHistory pattern).

Motivation

Microsoft.Data.Sqlite / EF ADO uses WHERE col = $id placeholders. WitSQL previously threw WitSqlParsingException on ``. Agent Forge worked around this with inline literals in MigrationHistory.IsApplied.

Test plan

  • dotnet test OutWit.slnx --configuration Release (full suite; one pre-existing flaky perf test on net10 under load)
  • New parser/engine/ADO tests for ``
  • `` numbered params unchanged

PARAM_DOLLAR_NAMED is lexed before $n numbered params; evaluator and serializer round-trip $paramName for Microsoft.Data.Sqlite compat.
ADO $id placeholders no longer become @$id in execution context.
Includes Forge-style MigrationHistory WHERE MigrationId = $id scenario.
@KarataevDmitry

Copy link
Copy Markdown
Member Author

Superseded by upstream PR: dmitrat#2 (cross-repo to dmitrat/WitDatabase). Fork PR was opened by mistake before upstream PR existed.

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