Repository navigation
Releases: Lojhan/typed-sql
Release list
typed-sql 2.1.0
typed-sql 2.1.0
typed-sql 2.1 makes repeated typed SQL fragments a first-class query-building primitive, completes
the grammar-owned PostgreSQL, MySQL, and SQLite analysis paths, and promotes SQLite to the stable
release train. Unsupported or incomplete language forms continue to fail closed.
Highlights
- Non-empty arrays of typed fragments can be interpolated directly as homogeneous, comma-separated
SQL structure. This supports type-safe multi-row inserts built withitems.map(...)without an
explicit join helper, while ordinary arrays remain single bound values. - PostgreSQL, MySQL, and SQLite now own their parsers, ASTs, tokenization, walking, versioned
built-in catalogs, capability selection, and diagnostics. The historical multi-dialect parser is
retained only as a deprecated typed-sql 2.x compatibility surface. - Schema snapshot format 2 adds canonical relation, constraint, index, type, routine, server-version,
and capability evidence. Version 1 and version 2 codecs remain isolated, with conservative v1
upgrades for existing projects. - PostgreSQL analysis expands across supported majors 14 through 18 with complete DML, compound and
recursive queries, advanced query structure, SQL/JSON forms, operator and cast selection,
extension manifests, introspection, and hardened execution behavior. - MySQL analysis adds mode-aware lexical behavior, complete DML and query structure, versioned
catalogs and support policy, schema-v2 introspection, collation-aware resolution, and hardened
runtime protocol handling. - SQLite is now stable, with versioned JSON, JSONB, date/time, math, and extension catalogs; complete
schema-v2 evidence; and an optional hardenednode:sqliteadapter. - The published conformance v2 API adds feature-addressable static and live differential testing,
exact-claim enforcement, reproduction evidence, and version-aware grammar feature ledgers. - A shared, versioned source-analysis service and
typed-sql doctorprovide deterministic compiler,
schema, grammar, capability, and editor compatibility identities with privacy-safe diagnostics.
Upgrade and compatibility
Read the v1 to v2 upgrade contract
when upgrading an older grammar, schema snapshot, or custom adapter. The
compatibility reference records the
supported and exactly tested environments.
The stable packages support Node.js 22.11 or newer. The compiler correctness path uses TypeScript
7.0.2. PostgreSQL, MySQL, and SQLite are stable dialect packages. PostgreSQL and MySQL use
application-installed drivers; SQLite's optional built-in adapter supports Node 22.13+, 24, and 26.
The following packages publish on the stable train:
@typed-sql/core@typed-sql/opentelemetry@typed-sql/ast@typed-sql/schema@typed-sql/config@typed-sql/compiler@typed-sql/conformance@typed-sql/postgres@typed-sql/mysql@typed-sql/sqlite@typed-sql/cli
@typed-sql/ts-bridge, @typed-sql/language-server, and the editor integrations remain
experimental. They stay on the next npm tag and are not dependencies of the stable packages. The
preview TypeScript and editor integration remains isolated from the stable compiler path.
Evidence
The protected release workflow verifies the exact release commit, exercises real packed-consumer
PostgreSQL, MySQL, and SQLite environments, packs and installs the eleven-package stable train, and
accepts the published release candidate from npm before promotion. Publication is retry-safe and
verifies the stable packages from npm before creating these aggregate release notes.
@typed-sql/sqlite@2.1.0
Minor Changes
- 1041bfa: Add the grammar-neutral parser toolkit and move first-party parsing, ASTs, tokenization, and walking into each grammar package. The historical multi-dialect AST parser is isolated as a deprecated typed-sql 2.x compatibility surface for removal in 3.0.
- 1041bfa: Allow non-empty arrays of typed SQL fragments to be interpolated directly as homogeneous,
comma-separated structure. Add fail-closed compiler analysis for direct map callbacks and fragment
literals, cardinality-independent artifacts, bounded prepared-cardinality caches, shared grammar
conformance, and runtime limits while preserving ordinary arrays as single bound values. - 1041bfa: Add canonical schema snapshot format 2 with isolated v1/v2 codecs, conservative v1 upgrades,
neutral relation/constraint/index/type/routine evidence, and complete provider introspection.
Resolvers now consume structural write and routine evidence, while drift, compatibility, manifests,
verification proofs, and plan artifacts bind to the schema format and canonical hash. - 1041bfa: Add versioned and compile-option-aware SQLite JSON, JSONB, date/time, math, and optional-extension
catalogs. Support JSON table-valued functions and an explicit application registry that preserves
scalar, aggregate, and window routine kinds in schema snapshot v2. - 1041bfa: Harden the optional Node SQLite adapter with connection-time SQLite version and compile-option
evidence, fail-closed generated-snapshot compatibility checks, policy-aligned storage codecs, and
schema-aware bounded statement-cache invalidation. The adapter's supported Node.js matrix is now
declared consistently as Node 22.13+, 24, and 26. - 1041bfa: Complete SQLite schema-v2 evidence for rowid aliases, STRICT and
WITHOUT ROWIDtables, generated
and hidden columns, virtual and shadow tables, checks, indexes, collations, triggers, and attached
databases. Preserve SQLite's primary-key nullability rules and use rowid evidence during query and
write analysis. - 1041bfa: Graduate the SQLite grammar and optional
node:sqliteadapter to the stable release track. The
stable contract covers SQLite 3.39.0 through 3.53.4, keeps unknown newer libraries conservative,
and verifies the adapter on Node 22.13+, 24, and 26 while leaving the driver-neutral grammar usable
on typed-sql's general Node.js range. - 1041bfa: Resolve SQLite core built-ins, operators, coercions, arities, nullability, and in-band function
release boundaries from SQLite-owned catalog data. Add a stable diagnostic for invalid SQLite
built-in invocations and fail closed when version-gated functions lack usable server evidence.
Patch Changes
- 1041bfa: Add deterministic versioned dialect capability states backed by normalized server versions,
settings, extensions, and compile options. Query manifests now invalidate on capability changes and
record evidence for capabilities each query uses, while the CLI exposes a human-readable capability
report. The boolean capability map remains available as an additive migration bridge. - Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- @typed-sql/core@2.1.0
- @typed-sql/ast@2.1.0
- @typed-sql/schema@2.1.0
@typed-sql/schema@2.1.0
Minor Changes
- 1041bfa: Add canonical schema snapshot format 2 with isolated v1/v2 codecs, conservative v1 upgrades,
neutral relation/constraint/index/type/routine evidence, and complete provider introspection.
Resolvers now consume structural write and routine evidence, while drift, compatibility, manifests,
verification proofs, and plan artifacts bind to the schema format and canonical hash. - 1041bfa: Add deterministic versioned dialect capability states backed by normalized server versions,
settings, extensions, and compile options. Query manifests now invalidate on capability changes and
record evidence for capabilities each query uses, while the CLI exposes a human-readable capability
report. The boolean capability map remains available as an additive migration bridge.
Patch Changes
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- @typed-sql/core@2.1.0
@typed-sql/postgres@2.1.0
Minor Changes
-
1041bfa: Add the grammar-neutral parser toolkit and move first-party parsing, ASTs, tokenization, and walking into each grammar package. The historical multi-dialect AST parser is isolated as a deprecated typed-sql 2.x compatibility surface for removal in 3.0.
-
1041bfa: Allow non-empty arrays of typed SQL fragments to be interpolated directly as homogeneous,
comma-separated structure. Add fail-closed compiler analysis for direct map callbacks and fragment
literals, cardinality-independent artifacts, bounded prepared-cardinality caches, shared grammar
conformance, and runtime limits while preserving ordinary arrays as single bound values. -
1041bfa: Complete PostgreSQL grouping-set, ordered/hypothetical aggregate, window-frame, lateral function,
ROWS FROM, ordinality, table-sampling, and pagination analysis. Grouping legality, window
inheritance and modifiers, record-returning functions, null-padded function rows, and version-stable
query clauses now infer exact or deliberately conservative types with source diagnostics. -
1041bfa: Infer PostgreSQL
UNION,INTERSECT, andEXCEPTrows and recursive CTE seed/member contracts,
including PostgreSQL 14+SEARCHandCYCLEgenerated columns. Invalid compound arity, missing
WITH RECURSIVE, misplaced seed terms, unsafe self-reference shapes, and invalid generated-column
references now fail closed with stable diagnostics and source spans. -
1041bfa: Add a public, versioned PostgreSQL extension manifest API for types, routines, operators, casts,
codecs, and optional driver-neutral introspection. Manifests activate from installed extension
version evidence, participate in fail-closed query analysis and snapshot generation, and report
unsupported versions or conflicting declarations with stable diagnostics. -
1041bfa: Complete PostgreSQL snapshot v2 introspection evidence for partition relationships, partition
strategies, search-path and role-scoped catalog visibility, routine parallel safety, record results,
and distinctanyelementandanycompatiblepolymorphic families. The provider keeps role names
out of serialized artifacts while making the visibility boundary explicit. -
1041bfa: Harden PostgreSQL execution with policy-owned scalar and array codecs, runtime extension codec OID
resolution, generated-snapshot compatibility checks, bounded per-connection prepared-statement
caches with schema and search-path invalidation, and structured driver failure classifications.
Keep the sharedTSQ230diagnostic registry text grammar-neutral. -
1041bfa: Publish the grammar-owned PostgreSQL support policy for upstream-supported majors 14 through 18,
the exact current minor selected for each differential target, PostgreSQL 19 beta as a canary, and
the deprecation window used when an upstream major reaches end of life. -
1041bfa: Resolve PostgreSQL operators and snapshot v2 routines through a grammar-owned candidate selector
that uses canonical types, cast contexts, preferred categories, unknown-literal rules, domains,
arrays, ranges, enums, and theanyelementandanycompatiblepolymorphic families.
Named, defaulted, expanded-variadic, and explicit-variadic routine calls now select against snapshot
argument evidence, while known invalid explicit casts produce a stable diagnostic.
The versioned core catalog now recognizes PostgreSQL temporal, bit-string, network, geometric,
full-text, XML, range, multirange, object-identifier, and related scalar types. Unary numeric and
bitwise operators, plus binary integer and bit-string operators, now resolve through typed
candidates and reject invalid operands. Date, timestamp, time, and interval arithmetic now uses
asymmetric PostgreSQL signatures, with parameter inference deferred until candidate selection.
Built-in range/multirange containment and arithmetic, network containment and address arithmetic,
full-text search composition, JSON-path predicates and deletion, and their multi-character tokens
now use exact grammar-owned signatures.
Geometric transformation, position, intersection, distance, containment, and relationship operators
now resolve through their exact operand and result signatures, including prefix forms.
Numeric promotion, mathematical prefix, bit-string shift, binary/JSON/text concatenation, money,
pg_lsn, and tuple-identifier operators now use catalog-derived signatures and coercions.
Array subscripts infer nullable element types, slices preserve the array type, omitted bounds are
represented explicitly, index parameters inferinteger, and nested array mappings retain every dimension.
ANY,SOME, andALLcomparisons now resolve array elements or single-column subqueries through
the operator catalog, while row comparisons validate arity and select an operator for each field pair.
Parenthesized composite field selection now uses snapshot v2 field evidence for its database type,
TypeScript type, nullability, parameter context, and unknown-field diagnostics.
COLLATEnow preserves collatable expression types, andAT TIME ZONEresolves PostgreSQL's exact
timestamp, timestamp-with-time-zone, and time-with-time-zone conversions with text or interval zones.
PostgreSQL 17 and newer also resolve and version-gate the correspondingAT LOCALforms.
Scalar and row-valuedINlists and subqueries now validate equality candidates, numeric literals,
row arity, composite field comparability, nullability, and per-position parameter contexts.
The versioned cast catalogs now include every directpg_castconversion among shipped core types
for PostgreSQL 14 through 18, including the PostgreSQL 15 geometric removal and PostgreSQL 18
integer/bytea additions. Automatic assignment-to-string and explicit string I/O casts follow the
server's fallback conversion rules.
PostgreSQL interval literals now parse prefix precision, every valid field and field-range qualifier,
suffix second precision, and qualified interval cast types while retaining typed-literal source spans.
All forms resolve through the canonicalintervaltype, and invalid field ranges fail during parsing.
JSON, JSONB, and JSONPATH typed literals now preserve their grammar-owned cast form. The core catalog
and resolver coverjsonb_path_exists,jsonb_path_match, query-array, query-first, and set-returning
query variants, including timezone-aware forms, optional variables/silent arguments, and nullability.
Database parameter identities are now retained even when their configured TypeScript mapping is
unknown, so JSON and other deliberately opaque codecs still produce typed prepared parameters.
PostgreSQL 17 and newer now parse and resolve the grammar-ownedJSON_EXISTSSQL/JSON expression,
including formatted inputs,PASSINGvariables, error behavior, parameter identities, nullability,
and server-version diagnostics.
The grammar-owned PostgreSQL 17JSON_QUERYform also resolves returning types, JSON output formats,
wrapper and quote behavior, constantON EMPTYandON ERRORdefaults, and exact output nullability.
PostgreSQL 17JSON_VALUEnow resolves scalar return types and behaviors while preserving its
always-possible SQL null result for JSON null and rejecting unsupported collection or format clauses.
PostgreSQL 16 and newer now parse and resolve the standardJSON_OBJECTandJSON_ARRAY
constructors, including key/value and query forms, null handling, unique-key declarations, formatted
inputs, encoded returns, parameter identities, non-null output types, and server-version diagnostics.
Legacy and quotedjson_object(...)calls remain ordinary catalog-backed routine calls.
PostgreSQL 17 and newer also ownJSON,JSON_SCALAR, andJSON_SERIALIZE, including JSON-compatible
inputs, uniqueness declarations, scalar and composite conversion, string or binary returns, UTF-8
encoding, parameter inference, null propagation, and version diagnostics. The overlapping pre-17
functionaljson(...)cast keeps its earlier cast semantics.
PostgreSQL 16 and newer now ownIS JSONandIS NOT JSONpredicates across value, scalar,
array, object, and unique-key constraints, with JSON-compatible input validation, text parameter
inference, SQL-null propagation, and server-version diagnostics.
PostgreSQL 16 and newer now also own the standardJSON_OBJECTAGGandJSON_ARRAYAGGgrammar,
including null and uniqueness clauses, aggregate-local ordering,FILTER,OVER, formatted inputs,
encoded returns, grouping validation, parameter inference, nullable empty-input results, and
server-version diagnostics.
PostgreSQL 17JSON_TABLEnow owns its table-reference grammar and resolves root, ordinality,
scalar, formatted,EXISTS, and nested columns with implicit lateral scope, alias lists, declared
types, behavior validation, nested null-padding, and server-version diagnostics.Expose optional routine argument names and default evidence through the neutral resolver bridge so
grammar packages can implement named, defaulted, and variadic call selection. -
1041bfa: Add deterministic generated PostgreSQL core catalogs for every supported major and the canary.
Type mapping, operator families, and built-in routine families now resolve from one version-selected
catalog revision instead of parallel hard-coded resolver lists. -
1041bfa: Complete PostgreSQL DML parsing and analysis for identity overriding,
ON CONFLICTtargets and the
excludednamespace, row assignments, source-aware update/delete returning, versionedMERGE, and
PostgreSQL 18 old/newRETURNINGaliases. Version-dependent forms now use server-major evidence and
fail closed when that evidence is absent or outside the feature's supported range. Snapshot v2 index
evidence now verifies expression, operator-class, collation, and partial-predicate conflict targets,
while insert/select, upd...
@typed-sql/opentelemetry@2.1.0
Patch Changes
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- @typed-sql/core@2.1.0
@typed-sql/mysql@2.1.0
Minor Changes
- 1041bfa: Add the grammar-neutral parser toolkit and move first-party parsing, ASTs, tokenization, and walking into each grammar package. The historical multi-dialect AST parser is isolated as a deprecated typed-sql 2.x compatibility surface for removal in 3.0.
- 1041bfa: Allow non-empty arrays of typed SQL fragments to be interpolated directly as homogeneous,
comma-separated structure. Add fail-closed compiler analysis for direct map callbacks and fragment
literals, cardinality-independent artifacts, bounded prepared-cardinality caches, shared grammar
conformance, and runtime limits while preserving ordinary arrays as single bound values. - 1041bfa: Complete MySQL data-modification parsing and analysis for insert modifiers, inserted-row aliases,
duplicate-key updates,REPLACE, joined multi-table updates and deletes, partitions, and
single-table ordering and limits. - 1041bfa: Apply normalized MySQL SQL modes before scanning.
ANSI_QUOTES,NO_BACKSLASH_ESCAPES, and
PIPES_AS_CONCATnow select exact lexical behavior, and executable server comments fail closed. - 1041bfa: Complete MySQL query-structure analysis for recursive CTEs, set operations, lateral derived tables,
locking placement, window frames and inheritance,ROLLUP, andONLY_FULL_GROUP_BY. - 1041bfa: Harden MySQL execution with per-connection snapshot compatibility checks, redacted warning reporting and strict warning rejection, bounded logical/native prepared-statement and decoder caches, and adapter-owned multi-statement disablement.
- 1041bfa: Capture normalized MySQL distribution, SQL mode, server and connection charset/collation, session
and system time zone, and identifier-case evidence. Exact capability selection now fails closed when
any required semantic setting is absent. - 1041bfa: Complete MySQL schema format 2 introspection for namespace defaults, invisible and spatial columns,
type attributes, constraint enforcement, index prefixes and visibility, routine metadata, and
permission-limited fail-closed diagnostics. Reject MariaDB and unidentified compatible servers
instead of emitting MySQL snapshots for unverified products. - 1041bfa: Publish the grammar-owned MySQL LTS, innovation-canary, patch-compatibility, and deprecation policy,
publish the default, lexical, and numeric SQL-mode profiles, and expose fail-closed server-version
classification throughmySqlVersionSupport(). Custom profiles containing an unmodeled mode now
remain conservative instead of receiving exact capability evidence. - 1041bfa: Add neutral column charset and collation evidence, generated versioned MySQL built-in catalogs,
catalog-backed type and function availability, MySQL collation coercibility, and signed/unsigned
numeric expression resolution.
Conformance v2 now compares grammar analysis against the neutral resolved-column contract while
allowing grammar-owned result evidence. - 1041bfa: Add canonical schema snapshot format 2 with isolated v1/v2 codecs, conservative v1 upgrades,
neutral relation/constraint/index/type/routine evidence, and complete provider introspection.
Resolvers now consume structural write and routine evidence, while drift, compatibility, manifests,
verification proofs, and plan artifacts bind to the schema format and canonical hash.
Patch Changes
- 1041bfa: Add the canonical, version-aware grammar feature ledger API and fail closed for PostgreSQL-style
UPDATE FROMandINSERT DEFAULT VALUESwhen analyzed by the MySQL grammar. - f3b9e6c: Align the published MySQL support evidence with the exact currently available Docker Official Image patches for the 8.4 and 9.7 LTS lines and the 26.7 innovation canary. Keep typed bulk loading portable across modeled SQL modes by expressing field, escape, and line delimiters as hexadecimal SQL literals instead of mode-sensitive escaped strings.
- 1041bfa: Add deterministic versioned dialect capability states backed by normalized server versions,
settings, extensions, and compile options. Query manifests now invalidate on capability changes and
record evidence for capabilities each query uses, while the CLI exposes a human-readable capability
report. The boolean capability map remains available as an additive migration bridge. - Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- @typed-sql/core@2.1.0
- @typed-sql/ast@2.1.0
- @typed-sql/schema@2.1.0
@typed-sql/core@2.1.0
Minor Changes
-
1041bfa: Add the versioned, serializable source-analysis service shared by batch checks and editor tooling.
Results carry deterministic source, project, schema, type-policy, grammar, and capability identities;
cancellation and source, query-count, structural-variant, and generated-declaration limits fail closed. -
1041bfa: Add a grammar-neutral serialized artifact compatibility identity and deterministic compatibility outcomes, and use the shared identity contract for query-manifest cache reuse.
-
1041bfa: Add structured opt-in debug events and confirmed support-bundle generation with privacy-safe default redaction.
-
1041bfa: Allow non-empty arrays of typed SQL fragments to be interpolated directly as homogeneous,
comma-separated structure. Add fail-closed compiler analysis for direct map callbacks and fragment
literals, cardinality-independent artifacts, bounded prepared-cardinality caches, shared grammar
conformance, and runtime limits while preserving ordinary arrays as single bound values. -
1041bfa: Add neutral column charset and collation evidence, generated versioned MySQL built-in catalogs,
catalog-backed type and function availability, MySQL collation coercibility, and signed/unsigned
numeric expression resolution.
Conformance v2 now compares grammar analysis against the neutral resolved-column contract while
allowing grammar-owned result evidence. -
1041bfa: Resolve PostgreSQL operators and snapshot v2 routines through a grammar-owned candidate selector
that uses canonical types, cast contexts, preferred categories, unknown-literal rules, domains,
arrays, ranges, enums, and theanyelementandanycompatiblepolymorphic families.
Named, defaulted, expanded-variadic, and explicit-variadic routine calls now select against snapshot
argument evidence, while known invalid explicit casts produce a stable diagnostic.
The versioned core catalog now recognizes PostgreSQL temporal, bit-string, network, geometric,
full-text, XML, range, multirange, object-identifier, and related scalar types. Unary numeric and
bitwise operators, plus binary integer and bit-string operators, now resolve through typed
candidates and reject invalid operands. Date, timestamp, time, and interval arithmetic now uses
asymmetric PostgreSQL signatures, with parameter inference deferred until candidate selection.
Built-in range/multirange containment and arithmetic, network containment and address arithmetic,
full-text search composition, JSON-path predicates and deletion, and their multi-character tokens
now use exact grammar-owned signatures.
Geometric transformation, position, intersection, distance, containment, and relationship operators
now resolve through their exact operand and result signatures, including prefix forms.
Numeric promotion, mathematical prefix, bit-string shift, binary/JSON/text concatenation, money,
pg_lsn, and tuple-identifier operators now use catalog-derived signatures and coercions.
Array subscripts infer nullable element types, slices preserve the array type, omitted bounds are
represented explicitly, index parameters inferinteger, and nested array mappings retain every dimension.
ANY,SOME, andALLcomparisons now resolve array elements or single-column subqueries through
the operator catalog, while row comparisons validate arity and select an operator for each field pair.
Parenthesized composite field selection now uses snapshot v2 field evidence for its database type,
TypeScript type, nullability, parameter context, and unknown-field diagnostics.
COLLATEnow preserves collatable expression types, andAT TIME ZONEresolves PostgreSQL's exact
timestamp, timestamp-with-time-zone, and time-with-time-zone conversions with text or interval zones.
PostgreSQL 17 and newer also resolve and version-gate the correspondingAT LOCALforms.
Scalar and row-valuedINlists and subqueries now validate equality candidates, numeric literals,
row arity, composite field comparability, nullability, and per-position parameter contexts.
The versioned cast catalogs now include every directpg_castconversion among shipped core types
for PostgreSQL 14 through 18, including the PostgreSQL 15 geometric removal and PostgreSQL 18
integer/bytea additions. Automatic assignment-to-string and explicit string I/O casts follow the
server's fallback conversion rules.
PostgreSQL interval literals now parse prefix precision, every valid field and field-range qualifier,
suffix second precision, and qualified interval cast types while retaining typed-literal source spans.
All forms resolve through the canonicalintervaltype, and invalid field ranges fail during parsing.
JSON, JSONB, and JSONPATH typed literals now preserve their grammar-owned cast form. The core catalog
and resolver coverjsonb_path_exists,jsonb_path_match, query-array, query-first, and set-returning
query variants, including timezone-aware forms, optional variables/silent arguments, and nullability.
Database parameter identities are now retained even when their configured TypeScript mapping is
unknown, so JSON and other deliberately opaque codecs still produce typed prepared parameters.
PostgreSQL 17 and newer now parse and resolve the grammar-ownedJSON_EXISTSSQL/JSON expression,
including formatted inputs,PASSINGvariables, error behavior, parameter identities, nullability,
and server-version diagnostics.
The grammar-owned PostgreSQL 17JSON_QUERYform also resolves returning types, JSON output formats,
wrapper and quote behavior, constantON EMPTYandON ERRORdefaults, and exact output nullability.
PostgreSQL 17JSON_VALUEnow resolves scalar return types and behaviors while preserving its
always-possible SQL null result for JSON null and rejecting unsupported collection or format clauses.
PostgreSQL 16 and newer now parse and resolve the standardJSON_OBJECTandJSON_ARRAY
constructors, including key/value and query forms, null handling, unique-key declarations, formatted
inputs, encoded returns, parameter identities, non-null output types, and server-version diagnostics.
Legacy and quotedjson_object(...)calls remain ordinary catalog-backed routine calls.
PostgreSQL 17 and newer also ownJSON,JSON_SCALAR, andJSON_SERIALIZE, including JSON-compatible
inputs, uniqueness declarations, scalar and composite conversion, string or binary returns, UTF-8
encoding, parameter inference, null propagation, and version diagnostics. The overlapping pre-17
functionaljson(...)cast keeps its earlier cast semantics.
PostgreSQL 16 and newer now ownIS JSONandIS NOT JSONpredicates across value, scalar,
array, object, and unique-key constraints, with JSON-compatible input validation, text parameter
inference, SQL-null propagation, and server-version diagnostics.
PostgreSQL 16 and newer now also own the standardJSON_OBJECTAGGandJSON_ARRAYAGGgrammar,
including null and uniqueness clauses, aggregate-local ordering,FILTER,OVER, formatted inputs,
encoded returns, grouping validation, parameter inference, nullable empty-input results, and
server-version diagnostics.
PostgreSQL 17JSON_TABLEnow owns its table-reference grammar and resolves root, ordinality,
scalar, formatted,EXISTS, and nested columns with implicit lateral scope, alias lists, declared
types, behavior validation, nested null-padding, and server-version diagnostics.Expose optional routine argument names and default evidence through the neutral resolver bridge so
grammar packages can implement named, defaulted, and variadic call selection. -
1041bfa: Complete PostgreSQL DML parsing and analysis for identity overriding,
ON CONFLICTtargets and the
excludednamespace, row assignments, source-aware update/delete returning, versionedMERGE, and
PostgreSQL 18 old/newRETURNINGaliases. Version-dependent forms now use server-major evidence and
fail closed when that evidence is absent or outside the feature's supported range. Snapshot v2 index
evidence now verifies expression, operator-class, collation, and partial-predicate conflict targets,
while insert/select, update, and merge writes propagate parameter types and reject known-incompatible
source types.The neutral resolver snapshot bridge now exposes optional index and constraint-deferrability evidence
so grammar packages can consume schema v2 conflict-target metadata without importing schema internals. -
1041bfa: Add canonical schema snapshot format 2 with isolated v1/v2 codecs, conservative v1 upgrades,
neutral relation/constraint/index/type/routine evidence, and complete provider introspection.
Resolvers now consume structural write and routine evidence, while drift, compatibility, manifests,
verification proofs, and plan artifacts bind to the schema format and canonical hash. -
1041bfa: Add deterministic versioned dialect capability states backed by normalized server versions,
settings, extensions, and compile options. Query manifests now invalidate on capability changes and
record evidence for capabilities each query uses, while the CLI exposes a human-readable capability
report. The boolean capability map remains available as an additive migration bridge.
Patch Changes
- 1041bfa: Harden PostgreSQL execution with policy-owned scalar and array codecs, runtime extension codec OID
resolution, generated-snapshot compatibility checks, bounded per-connection prepared-statement
caches with schema and search-path invalidation, and structured driver failure classifications.
Keep the sharedTSQ230diagnostic registry text grammar-neutral. - 1041bfa: Resolve SQLite core built-ins, operators, coercions, arities, nullability, and in-band function
release boundaries from SQLite-owned catalog data. Add a stable diagnostic for invalid SQLite
built-in invocations and fail closed whe...
@typed-sql/conformance@2.1.0
Minor Changes
- 1041bfa: Add the canonical, version-aware grammar feature ledger API and fail closed for PostgreSQL-style
UPDATE FROMandINSERT DEFAULT VALUESwhen analyzed by the MySQL grammar. - 1041bfa: Add the published
@typed-sql/conformance/v2feature-addressable static and live differential harness, target selection, exact-claim enforcement, reporters, fixture discovery, reduction, reproduction bundles, and a non-inflating v1 migration adapter. - 1041bfa: Allow non-empty arrays of typed SQL fragments to be interpolated directly as homogeneous,
comma-separated structure. Add fail-closed compiler analysis for direct map callbacks and fragment
literals, cardinality-independent artifacts, bounded prepared-cardinality caches, shared grammar
conformance, and runtime limits while preserving ordinary arrays as single bound values. - 1041bfa: Add deterministic conformance failure injection and expose the bounded config and language-server cache defaults used by reliability suites.
- 1041bfa: Add deterministic versioned dialect capability states backed by normalized server versions,
settings, extensions, and compile options. Query manifests now invalidate on capability changes and
record evidence for capabilities each query uses, while the CLI exposes a human-readable capability
report. The boolean capability map remains available as an additive migration bridge.
Patch Changes
- 1041bfa: Add neutral column charset and collation evidence, generated versioned MySQL built-in catalogs,
catalog-backed type and function availability, MySQL collation coercibility, and signed/unsigned
numeric expression resolution.
Conformance v2 now compares grammar analysis against the neutral resolved-column contract while
allowing grammar-owned result evidence. - Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- @typed-sql/core@2.1.0
- @typed-sql/compiler@2.1.0
@typed-sql/config@2.1.0
Minor Changes
- 1041bfa: Add deterministic conformance failure injection and expose the bounded config and language-server cache defaults used by reliability suites.
Patch Changes
- 1041bfa: Reuse a bounded content-addressed config module cache so repeated project and editor lifecycles do not retain a new TypeScript loader for unchanged configuration.
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- @typed-sql/core@2.1.0
@typed-sql/compiler@2.1.0
Minor Changes
- 1041bfa: Add the versioned, serializable source-analysis service shared by batch checks and editor tooling.
Results carry deterministic source, project, schema, type-policy, grammar, and capability identities;
cancellation and source, query-count, structural-variant, and generated-declaration limits fail closed. - 1041bfa: Allow non-empty arrays of typed SQL fragments to be interpolated directly as homogeneous,
comma-separated structure. Add fail-closed compiler analysis for direct map callbacks and fragment
literals, cardinality-independent artifacts, bounded prepared-cardinality caches, shared grammar
conformance, and runtime limits while preserving ordinary arrays as single bound values. - 1041bfa: Add canonical schema snapshot format 2 with isolated v1/v2 codecs, conservative v1 upgrades,
neutral relation/constraint/index/type/routine evidence, and complete provider introspection.
Resolvers now consume structural write and routine evidence, while drift, compatibility, manifests,
verification proofs, and plan artifacts bind to the schema format and canonical hash. - 1041bfa: Reject unsupported TypeScript compiler and preview patches before project work begins. Add
typed-sql doctorwith human and JSON reports for Node.js, TypeScript, grammar, schema, redacted
server evidence, language-server/bridge metadata, and editor protocol compatibility. - 1041bfa: Add deterministic versioned dialect capability states backed by normalized server versions,
settings, extensions, and compile options. Query manifests now invalidate on capability changes and
record evidence for capabilities each query uses, while the CLI exposes a human-readable capability
report. The boolean capability map remains available as an additive migration bridge.
Patch Changes
- 1041bfa: Add a grammar-neutral serialized artifact compatibility identity and deterministic compatibility outcomes, and use the shared identity contract for query-manifest cache reuse.
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- Updated dependencies [1041bfa]
- @typed-sql/core@2.1.0
- @typed-sql/schema@2.1.0