Minor Changes
-
Added
SqliteDatabase.close()to release the connection and file handle owned by a config-backed database. Supplied clients remain caller-owned. Config-backed databases keep the database file locked on Windows until closed, so callers that need to move or delete the file should callawait db.close()first. -
Added
createSqliteDatabase()with filename-based construction, optional persistent foreign key enforcement, and database wiping forremix db. Existing synchronous SQLite clients remain supported for applications that own the driver lifecycle, but wiping requires config-backed construction (see #11608, #11639).Config-backed databases make the
foreignKeysoption authoritative on every runtime: enforcement defaults to off, including on Node.js wherenode:sqlitewould otherwise enable it by default. They also apply a defaultbusy_timeoutof 5000ms (override with the newbusyTimeoutoption), andwipe()removes-wal/-shm/-journalsidecar files along with the main database file. The runtime SQLite driver loads lazily on config-backed construction, so client-backed databases work in environments that cannot resolvenode:sqliteorbun:sqliteat import time.BREAKING CHANGE: Removed
SqliteDatabaseAdapterandcreateSqliteDatabaseAdapter()from the public entry point. UseSqliteDatabaseandcreateSqliteDatabase()to get a complete SQLite-backedDatabase.SqliteDatabaseAdapterConfigwas renamed toSqliteDatabaseConfig, and the formerSqliteDatabaseclient interface was renamed toSqliteDatabaseClient. Callawait db.close()to release file handles opened from configuration; supplied clients remain caller-owned.
Patch Changes
-
Use bound parameters for compiled
limitandoffsetclauses. -
Bumped
@remix-run/*dependencies: