Skip to content
All changes

FeatureEnhancement

SQLite and PGlite - Two Embedded Relational Engines

@venizia/ignis

Changelog - 2026-08-02 ​

SQLite and PGlite - Two Embedded Relational Engines ​

New Feature Enhancement

In one line. IGNIS gains a SQLite connector at @venizia/ignis/sqlite (driven by libsql) and a PGliteDriver that runs real Postgres in your process as WebAssembly. Nothing breaks, and existing Postgres code is untouched.

What changed ​

  • SQLite connector at @venizia/ignis/sqlite, with the libsql driver at @venizia/ignis/sqlite/libsql. It has a datasource, an entity base, five repository classes, five column enrichers, and a SQLite dialect for filters and JSON updates.
  • PGliteDriver at @venizia/ignis/postgres/pglite. It reuses the whole Postgres connector - same dialect, enrichers and pgTable models.
  • Unsupported SQLite features throw. Row locking, regexp, array operators and isolation levels raise 501 Not Implemented with normalized.code: 'core.not_supported'.
  • Optional peer dependencies. @electric-sql/pglite and @libsql/client are optional, and neither reaches the @venizia/ignis root barrel, so apps that use neither pull in neither.

Who is affected ​

  • Every existing Postgres application. No action needed. No symbol was removed, renamed or re-signatured.
  • Anyone writing tests against a database. PGliteDriver gives real Postgres semantics with no Docker. See PGlite.
  • Anyone shipping a CLI, desktop app or edge worker. Both engines run embedded. See SQLite.
  • Anyone considering SQLite in production. Read the capability table on the SQLite page first.
  • Anyone using the Authentication, Authorization or StaticAssetComponent components. They stay Postgres-only in this release, because their models are pgTable.
  • Upgrading across the relational lift too. The renames are in the Relational Connector Lift migration guide.

Details ​

Where SQLite and Postgres answer differently:

CallPostgreSQLSQLite
{ like: 'alpha' }matches alphamatches Alpha and alpha
{ nlike: 'alpha' }keeps Alphadrops Alpha
order: ['score ASC'] with a NULLNULL lastNULL first

SQLite

  • :memory:, file:./data.db, a Turso libsql:// URL and an embedded replica all run on the one driver. BaseSqliteDataSource inherits getConnectionString().
  • SQLite has no isolation levels. Use the locking mode SqliteBeginModes.DEFERRED | IMMEDIATE | EXCLUSIVE, which defaults to IMMEDIATE. BEGIN DEFERRED fails with SQLITE_BUSY if another writer got there first. Passing isolationLevel throws.
  • .returning() works on insert, update and delete.

PGlite

  • PGlite reports PostgreSQL 18.3, so #>> JSON paths, ILIKE, regex operators, arrays and SELECT ... FOR UPDATE work unchanged. It has one session, so transactions serialise.
  • The wait for the session is bounded by acquireTimeoutMs, default PGliteDriver.DEFAULT_ACQUIRE_TIMEOUT_MS (30000). A leaked transaction then surfaces as a named error on the next acquire(). The timeout bounds the wait, never the transaction.
  • A write through createConnector() without options.transaction runs inside whatever transaction is open, and that transaction's ROLLBACK discards it. Under concurrency, pass the transaction.
  • Postgres writes with shouldReturn: false now work on PGlite, which reports affectedRows only.

See also: SQLite, PGlite, Relational Connector Lift and Connectors.