@syncular/dialect-better-sqlite3 0.0.1-72 → 0.0.1-83
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.
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { SerializePlugin } from '@syncular/core';
|
|
9
9
|
import type { Database as BetterSqlite3Database } from 'better-sqlite3';
|
|
10
|
-
import { Kysely } from 'kysely';
|
|
11
|
-
interface BetterSqlite3PathOptions {
|
|
10
|
+
import { Kysely, SqliteDialect } from 'kysely';
|
|
11
|
+
export interface BetterSqlite3PathOptions {
|
|
12
12
|
/** Path to SQLite database file, or ':memory:' for in-memory */
|
|
13
13
|
path: string;
|
|
14
14
|
}
|
|
15
|
-
interface BetterSqlite3InstanceOptions {
|
|
15
|
+
export interface BetterSqlite3InstanceOptions {
|
|
16
16
|
/** An existing better-sqlite3 Database instance */
|
|
17
17
|
database: BetterSqlite3Database;
|
|
18
18
|
}
|
|
19
|
-
type BetterSqlite3Options = BetterSqlite3PathOptions | BetterSqlite3InstanceOptions;
|
|
19
|
+
export type BetterSqlite3Options = BetterSqlite3PathOptions | BetterSqlite3InstanceOptions;
|
|
20
20
|
/**
|
|
21
21
|
* Create a Kysely instance with better-sqlite3 dialect and SerializePlugin.
|
|
22
22
|
*
|
|
@@ -29,6 +29,9 @@ type BetterSqlite3Options = BetterSqlite3PathOptions | BetterSqlite3InstanceOpti
|
|
|
29
29
|
* const db = createBetterSqlite3Db<MyDb>({ database: new Database(':memory:') });
|
|
30
30
|
*/
|
|
31
31
|
export declare function createBetterSqlite3Db<T>(options: BetterSqlite3Options): Kysely<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Create the better-sqlite3 dialect directly (without SerializePlugin).
|
|
34
|
+
*/
|
|
35
|
+
export declare function createBetterSqlite3Dialect(options: BetterSqlite3Options): SqliteDialect;
|
|
32
36
|
export declare function createSerializePlugin(): SerializePlugin;
|
|
33
|
-
export {};
|
|
34
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,IAAI,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,IAAI,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,WAAW,wBAAwB;IACvC,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,4BAA4B;IAC3C,mDAAmD;IACnD,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AAED,MAAM,MAAM,oBAAoB,GAC5B,wBAAwB,GACxB,4BAA4B,CAAC;AAEjC;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAAC,CAAC,CAAC,CAKX;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,oBAAoB,GAC5B,aAAa,CAIf;AAED,wBAAgB,qBAAqB,IAAI,eAAe,CAEvD"}
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ export function createBetterSqlite3Db(options) {
|
|
|
28
28
|
/**
|
|
29
29
|
* Create the better-sqlite3 dialect directly (without SerializePlugin).
|
|
30
30
|
*/
|
|
31
|
-
function createBetterSqlite3Dialect(options) {
|
|
31
|
+
export function createBetterSqlite3Dialect(options) {
|
|
32
32
|
const database = 'database' in options ? options.database : new Database(options.path);
|
|
33
33
|
return new SqliteDialect({ database });
|
|
34
34
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAgB/C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAA6B,EAClB;IACX,OAAO,IAAI,MAAM,CAAI;QACnB,OAAO,EAAE,0BAA0B,CAAC,OAAO,CAAC;QAC5C,OAAO,EAAE,CAAC,IAAI,eAAe,EAAE,CAAC;KACjC,CAAC,CAAC;AAAA,CACJ;AAED;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAgB/C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAA6B,EAClB;IACX,OAAO,IAAI,MAAM,CAAI;QACnB,OAAO,EAAE,0BAA0B,CAAC,OAAO,CAAC;QAC5C,OAAO,EAAE,CAAC,IAAI,eAAe,EAAE,CAAC;KACjC,CAAC,CAAC;AAAA,CACJ;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACxC,OAA6B,EACd;IACf,MAAM,QAAQ,GACZ,UAAU,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,OAAO,IAAI,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAA,CACxC;AAED,MAAM,UAAU,qBAAqB,GAAoB;IACvD,OAAO,IAAI,eAAe,EAAE,CAAC;AAAA,CAC9B"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -11,17 +11,17 @@ import type { Database as BetterSqlite3Database } from 'better-sqlite3';
|
|
|
11
11
|
import Database from 'better-sqlite3';
|
|
12
12
|
import { Kysely, SqliteDialect } from 'kysely';
|
|
13
13
|
|
|
14
|
-
interface BetterSqlite3PathOptions {
|
|
14
|
+
export interface BetterSqlite3PathOptions {
|
|
15
15
|
/** Path to SQLite database file, or ':memory:' for in-memory */
|
|
16
16
|
path: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
interface BetterSqlite3InstanceOptions {
|
|
19
|
+
export interface BetterSqlite3InstanceOptions {
|
|
20
20
|
/** An existing better-sqlite3 Database instance */
|
|
21
21
|
database: BetterSqlite3Database;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
type BetterSqlite3Options =
|
|
24
|
+
export type BetterSqlite3Options =
|
|
25
25
|
| BetterSqlite3PathOptions
|
|
26
26
|
| BetterSqlite3InstanceOptions;
|
|
27
27
|
|
|
@@ -48,7 +48,7 @@ export function createBetterSqlite3Db<T>(
|
|
|
48
48
|
/**
|
|
49
49
|
* Create the better-sqlite3 dialect directly (without SerializePlugin).
|
|
50
50
|
*/
|
|
51
|
-
function createBetterSqlite3Dialect(
|
|
51
|
+
export function createBetterSqlite3Dialect(
|
|
52
52
|
options: BetterSqlite3Options
|
|
53
53
|
): SqliteDialect {
|
|
54
54
|
const database =
|