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

0.6.1 • 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

Package Sidebar

Install

npm i kysely-sqlite-worker

Weekly Downloads

85

Version

0.6.1

License

MIT

Unpacked Size

14 kB

Total Files

12

Last publish

Collaborators

  • subframe7536