Skip to content

[2/2] fix(parser): SQLite $name parameters (Microsoft.Data.Sqlite / EF ADO compat)#2

Merged
dmitrat merged 16 commits into
dmitrat:mainfrom
AI-Guiders:fix/sqlite-dollar-named-parameters
Jun 13, 2026
Merged

[2/2] fix(parser): SQLite $name parameters (Microsoft.Data.Sqlite / EF ADO compat)#2
dmitrat merged 16 commits into
dmitrat:mainfrom
AI-Guiders:fix/sqlite-dollar-named-parameters

Conversation

@KarataevDmitry

@KarataevDmitry KarataevDmitry commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

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

Motivation

Microsoft.Data.Sqlite / EF ADO uses WHERE col = $id placeholders. WitSQL previously threw WitSqlParsingException on $name. Downstream (Agent Forge) worked around this with inline literals in migration history checks.

Merge order

Step 2 of 2 — merge after [1/2] CI stabilization#3

Test plan

Expose witdb_open/get/put/delete/txn via NativeAOT for pywitdb ctypes; include smoke harness and witdb.h.
SQLite-compat: IN/NOT IN, EXISTS, and FROM subqueries use full queryExpression so CASA-style prune DELETE works.
Extend WitDb native C ABI for SQL helpers; refresh smoke harness and parser tests.
Multi-target net9/net10 builds race on Maven Central jar downloads in GitHub Actions (Antlr4BuildTasks #99). Point AntlrProbePath at a checked-in antlr4-4.13.1-complete.jar and assert it in CI.
AntlrProbePath file URI with parent segments did not resolve on GitHub Actions; use explicit GetFullPath to build/antlr/antlr4-4.13.1-complete.jar.
DisposeAsync cancelled workers before pending channel items were flushed, causing DisposeWaitsForPendingFlushesTest to fail on CI.
@KarataevDmitry KarataevDmitry force-pushed the fix/sqlite-dollar-named-parameters branch from 4acaa59 to d9c9cad Compare June 12, 2026 20:44
@KarataevDmitry KarataevDmitry force-pushed the fix/sqlite-dollar-named-parameters branch from d9c9cad to 26889d9 Compare June 12, 2026 20:46
@KarataevDmitry KarataevDmitry changed the title fix(parser): SQLite $name parameters (Microsoft.Data.Sqlite / EF ADO compat) [2/2] fix(parser): SQLite $name parameters (Microsoft.Data.Sqlite / EF ADO compat) Jun 12, 2026
Antlr4BuildTasks reads jar path from Antlr4 item metadata; PropertyGroup alone left net10.0 with an empty jar on Linux.
Match flusher fix: wait for workers after channel complete, then cancel CTS.
Path.GetFileNameWithoutExtension failed for C:\\ paths on ubuntu-latest CI runners.
@KarataevDmitry KarataevDmitry force-pushed the fix/sqlite-dollar-named-parameters branch from 26889d9 to 7102949 Compare June 12, 2026 22:34
Cancellation exited the merge loop without flushing queued buffers; finally block drains pending writes.
ItemDefinitionGroup after Antlr4 items left metadata empty on clean CI builds.
@KarataevDmitry KarataevDmitry force-pushed the fix/sqlite-dollar-named-parameters branch 2 times, most recently from 7d2542f to 18e33be Compare June 12, 2026 22:43
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 KarataevDmitry force-pushed the fix/sqlite-dollar-named-parameters branch from 18e33be to 0df9b79 Compare June 12, 2026 22:47
@KarataevDmitry

Copy link
Copy Markdown
Contributor Author

Perf CI gate is handled in PR #3 (Category=Performance excluded; thresholds not relaxed). This PR does not change INSERT/engine hot paths.

@dmitrat dmitrat merged commit c7f0362 into dmitrat:main Jun 13, 2026
1 check failed
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.

2 participants