v1.0.0-rc.4
v1.0.0-rc.4
drizzle-orm
View on GitHubView PackagePublished: Jun 27, 2026

Release Notes

v1.0.0-rc.4

  • Fixed broken View types when using Subquery in selection
  • Fixed custom types' JSON field API not being applied when column is used as a decoder on SQL fields
  • Fixed codecs not getting applied to SQL field when .mapWith(column) is set (fixes #5724)
  • Fixed Subquery fields' columns' codecs not being applied to subquery
  • Fixed broken in rc.3 db.select in bun-sql/pg driver (fixes #5779)
  • Updated SQLite db.$count builder to include .sync() executor for sync drivers
  • Removed RQBv1 from sqlite, removed RQBv1 TSchema, TFullSchema arguments from sqlite entities' generics
  • Fixed instances of sqlite query errors not being wrapped in DrizzleQueryError (db.batch() excluded due to api incompatibility)
  • Fixed type error on CockroachArrayBuilder constructor caused by referencing internal field's type
  • Removed mapResult method from PreparedQuery interface, removed mapResult, mapBatchResult from pg and sqlite raw queries
  • Fixed wrong bun-sqlite run result type
  • Switched sqlite RQBv2 to array mode
  • Enabled optimized default query mappers for sqlite
  • Reworked sqlite sessions: replaced per-driver PreparedQuery instances with executors passed via sessions, similar to current postgresql and mysql implementations, moved useJitMappers flag handling to dialect
  • Fixed missing string overload on .comment(sqlCommenterComment) in query builders
  • Supported nested transactions in @tursodatabase/database, @tursodatabase/database-wasm
  • Added filesytem-less migrator for @tursodatabase/database-wasm at drizzle-orm/tursodatbase/wasm-migrator
  • Split SQLite into async, effect versions (sync remains subtype of async)
  • Removed SQLiteSyncDialect, SQLiteAsyncDialect, moved generic SQLite async\sync migrators to sqlite-core/async/session as migrateSync, migrateAsync
  • Fixed sqlite cache using same cache entry for different execute methods
  • Moved EffectDrizzlePgConfig to drizzle-orm/pg-core/effect/utils
  • Made cache field in EffectCacheShape optional
  • Split mysql into async, effect versions
  • Added codec system to mysql
  • Fixed mysql float rounding to either 6 digits or double
  • Fixed mysql cropping .000 from timestamp(3)
  • Moved subquery mapper selection from dialect.buildSelection to orderSelectedFields;
  • [PG, MySQL] Improved codec system in set operators:
    • When different db types are crossed in a union, db casts them to type it deems as closest compatible to all types involved
    • If columns with codecs are set on both sides of union - codec of combined type will apply
    • If only the left-hand side of union has field with codec - left hand side's codec is preserved
    • If left-hand side field is devoid of codecs - field is not processed by codecs;
    • Set operator queries are switched from [QUERY 1] UNION [QUERY 2] to SELECT ... FROM ([QUERY 1] UNION [QUERY 2]) "drizzle_union" so cast codecs would apply after union's type mutation
    • Retrieved data of union with different types still may be lossy due to db's own conversion
  • Bump required effect package versions to 4.0.0-beta.83
  • Fixed sql.param passing Placeholder as expected input value to encoder function instead of Placeholder's value type
  • Fixed unguarded Buffer reference in drizzle-orm/effect-schema that caused error in environments without Buffer
  • Fixed sqlite blob column runtime-type default mode mismatch (fixes #1064)
  • Improved typed sql operator - preserved nullability, inferred initial data type to mapWithcallback argument, added .nullable() method to modify output type with | null (fixes #571):
      // Before:
      sql<Type | null>`...`.mapWith((v: any) => String(v)) // Output type: string
      // After:
      sql<Type | null>`...`.mapWith((v: Type) => String(v)) // Output type: string | null
      // `.nullable()` method:
      sql`...`.mapWith((v: unknown) => new Type(v)).nullable() // Output type: Type | null
    
  • Fixed generatedByDefaultAsIdentity columns not being filtered from inserts in runtime in postgres dialect
  • Improved db.insert(table).select(...): removed column order match requirement, allowed skipping selection for columns with defaults or nullability (fixes #3608)

Drivers

  • Updated @tursodatabase/database, @tursodatabase/database-wasm to v0.6.0, updated session internals for asynchronous prepare on driver side

  • Added @tursodatabase/serverless driver support

  • Added @tursodatabase/sync driver support

  • Added @effect/sql-pglite driver support

  • Added @effect/sql-sqlite-node driver support

  • Added @effect/sql-sqlite-bun driver support

  • Added @effect/sql-sqlite-do driver support

  • Added @effect/sql-sqlite-wasm driver support

  • Added @effect/sql-libsql driver support

  • Added @effect/sql-d1 driver support

  • Added @effect/sql-mysql2 driver support

  • Fixed @effect/sql-pg driver returning object response instead of raw response on db.execute

  • pg-proxy: added dialect config to optional dialect creator callback

  • Fixed postgres pull from failing for non-admin roles (fixes #5568)

  • Fixed: [BUG]: [mssql] INSERT includes generatedAlwaysAs (computed) columns in the column list — SQL Server error 271