kysely-sqlite-worker
TypeScript icon, indicating that this package has built-in type declarations

0.6.3 • Public • Published

kysely-sqlite-worker

kysely dialect for better-sqlite, execute sql in node:worker_threads

the type is also availiable for better-sqlite3-multiple-ciphers

Install

pnpm add kysely kysely-sqlite-worker better-sqlite3

Config

export type SqliteWorkerDialectConfig = {
  /**
   * db file path or existing buffer
   */
  source: string | Buffer | (() => Promisable<string | Buffer>)
  /**
   * better-sqlite3 initiate option
   */
  option?: Options
  onCreateConnection?: (connection: DatabaseConnection) => Promisable<void>
}

Notice

the worker script is read from join(__dirname, 'worker.js') by default, you can customize the path

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i kysely-sqlite-worker

      Weekly Downloads

      57

      Version

      0.6.3

      License

      MIT

      Unpacked Size

      16.5 kB

      Total Files

      12

      Last publish

      Collaborators

      • subframe7536