Skip to content

Commit 96bd2ce

Browse files
committed
refactor(vnext): extract realm-neutral parser backend
1 parent a775bf4 commit 96bd2ce

4 files changed

Lines changed: 1336 additions & 390 deletions

File tree

docs/vnext/node-sql-parser-adapter.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ statement slice. Locations remain partial: PostgreSQL commonly omits root and
4545
identifier locations, while BigQuery provides broader but still incomplete
4646
coverage.
4747

48+
Module-shape decoding, parser invocation, result validation, and error
49+
normalization live in a realm-neutral internal backend engine. That engine has
50+
no Node, browser-window, or worker dependency. The Node adapter remains
51+
responsible for realm validation, module loading, cleanup, parser authority,
52+
and private AST ownership. A browser worker can therefore reuse the same
53+
backend semantics without importing Node globals or weakening main-realm
54+
artifact authenticity.
55+
4856
Loading the distributed bundles may write `NodeSQLParser` or `global` on a
4957
global object. The adapter rejects parser loads whenever `window` or `self`
5058
exists, or `global` does not resolve exactly to `globalThis`, before loading a

0 commit comments

Comments
 (0)