@pikku/kysely-bun-sqlite 0.12.11 → 0.12.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import { Kysely, type KyselyPlugin } from 'kysely';
2
+ import { type TraceDriverOptions } from '@pikku/kysely';
2
3
  import type { SqliteFunctionMap } from '@pikku/kysely-sqlite';
3
- export interface CreateBunSqliteKyselyOptions {
4
+ export interface CreateBunSqliteKyselyOptions extends Omit<TraceDriverOptions, 'system'> {
4
5
  /** Path to the SQLite file. Use ':memory:' for an in-memory DB. */
5
6
  filename: string;
6
7
  /** Apply CamelCasePlugin so DB columns map to camelCase TS fields. Default true. */
@@ -1,5 +1,6 @@
1
1
  import { Database } from 'bun:sqlite';
2
2
  import { Kysely, SqliteDialect, CamelCasePlugin, } from 'kysely';
3
+ import { traceDialect } from '@pikku/kysely';
3
4
  import { BunSqliteDatabase } from './bun-sqlite-adapter.js';
4
5
  import { registerSqliteFunctions } from './register-functions.js';
5
6
  export function createBunSqliteKysely(options) {
@@ -14,7 +15,12 @@ export function createBunSqliteKysely(options) {
14
15
  if (options.plugins)
15
16
  plugins.push(...options.plugins);
16
17
  return new Kysely({
17
- dialect: new SqliteDialect({ database: new BunSqliteDatabase(db) }),
18
+ dialect: traceDialect(new SqliteDialect({ database: new BunSqliteDatabase(db) }), {
19
+ tracer: options.tracer,
20
+ currentTrace: options.currentTrace,
21
+ recordSqlText: options.recordSqlText,
22
+ system: 'sqlite',
23
+ }),
18
24
  plugins,
19
25
  });
20
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/kysely-bun-sqlite",
3
- "version": "0.12.11",
3
+ "version": "0.12.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pikkujs/pikku.git",
@@ -29,15 +29,15 @@
29
29
  "bun": ">=1.4.0"
30
30
  },
31
31
  "dependencies": {
32
- "@pikku/kysely": "^0.13.39",
33
- "@pikku/kysely-sqlite": "^0.12.18",
32
+ "@pikku/kysely": "^0.13.43",
33
+ "@pikku/kysely-sqlite": "^0.12.19",
34
34
  "kysely": "^0.29.6"
35
35
  },
36
36
  "peerDependencies": {
37
- "@pikku/core": "^0.12.144"
37
+ "@pikku/core": "^0.12.156"
38
38
  },
39
39
  "devDependencies": {
40
- "@pikku/core": "^0.12.144",
40
+ "@pikku/core": "^0.12.156",
41
41
  "@types/bun": "^1.4.3"
42
42
  }
43
43
  }