Skip to content

v0.17.0

Latest

Choose a tag to compare

@codybrouwers codybrouwers released this 03 Sep 05:12
847df0f

Fixed

  • Explicit scoped projections preserve nullable column types, including nested selection objects.
  • Left-joined columns in explicit projections are nullable, matching Drizzle, including nested objects from the optional table.
  • Whole-row select() with .leftJoin(...) / .innerJoin(...) is typed as Drizzle's nested per-table rows with left-joined tables nullable, instead of flat root rows.

Changed

  • InferSelection and scoped projections resolve through Drizzle's own SelectResultFields, so inference is identical before and after joins and whole-table entries resolve to rows. Unsupported leaf shapes are never, as in Drizzle, instead of unknown.
  • orderBy(...) and groupBy(...) accept Column | SQL | SQL.Aliased instead of any.
  • insert(...).values(...) and update(...).set(...) payloads use the dialect's own Drizzle types (PgInsertValue, SQLiteInsertValue, MySqlInsertValue, and the matching update set sources), selected by the table's dialect, so placeholders and column references are accepted exactly as in raw Drizzle.
  • select(...), selectDistinct(...), and selectDistinctOn(...) projections are constrained to Drizzle's SelectedFields, so non-selection objects are rejected at compile time.

These are type-only changes. Generated SQL and runtime behavior are unchanged. Callers may see new compile errors where a left-joined field was used without a null check or where a projection contained a non-Drizzle value; both point at code that was already wrong at runtime.

Install

npm install @modem-dev/drizzle-scoped-db@0.17.0 drizzle-orm

Verification

  • 151 tests passed with 100% statement, branch, function, and line coverage on the locked and Drizzle 1.0 RC matrices.
  • The release benchmark gate passed against 0.16.0 with no accepted regressions.
  • The new type-check benchmark gate passed against 0.16.0: type count +17.1%, instantiation count +16.5%, under the +20% threshold.