Prisma driver adapter for node:sqlite
Following the same config and behavior as Prisma's better-sqlite3 adapter,
without having to download/build additional binary or manage lifecycle script authorizations.
Node.js built-in SQLite support is a release candidate since v25.7.0,
and has all the features needed here since v24.0.0.
An experimental warning is however emitted before RC.
Tested using Prisma test suites (see workflow).
npm install prisma-adapter-sqlite
import 'dotenv/config';
import { PrismaSqlite } from 'prisma-adapter-sqlite';
const adapter = new PrismaSqlite({
url: process.env.DATABASE_URL,
});DateTime values can be stored in ISO 8601 format (default) or as milliseconds unixepoch timestamps.
This can be set with a second config argument in the constructor:
const adapter = new PrismaSqlite(
{ url: process.env.DATABASE_URL },
{ timestampFormat: 'unixepoch-ms' } // iso8601 by default
);Node.js >= v24
@prisma/client >= 7.5.0
--
Derived from @prisma/adapter-better-sqlite3