This is a Prisma adapter for the native node:sqlite database. It is heavily inspired by the @prisma/adapter-better-sqlite3 adapter.
$ npm i prisma-adapter-node-sqlitedatasource db {
provider = "sqlite"
url = "file:./dev.db"
}import { PrismaNodeSQLite } from 'prisma-adapter-node-sqlite';
const adapter = new PrismaNodeSQLite({
url: 'file:./prisma/dev.db',
});
const prisma = new PrismaClient({ adapter });import { PrismaNodeSQLite } from 'prisma-adapter-node-sqlite';
const adapter = new PrismaNodeSQLite(
{
url: 'file:./prisma/dev.db',
},
{ timestampFormat: 'unixepoch-ms' }
);
const prisma = new PrismaClient({ adapter });When to use each format:
ISO 8601 (default): Best for new projects and integrates well with SQLite's built-in date/time functions.unixepoch-ms: Required when migrating from Prisma ORM's native SQLite driver to maintain compatibility with existing timestamp data.
