@syncular/dialect-react-native-nitro-sqlite 0.0.2-128 → 0.0.2-133
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/README.md +1 -1
- package/dist/index.d.ts +2 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -11
- package/dist/index.js.map +1 -1
- package/package.json +2 -4
- package/src/index.ts +2 -12
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
* @syncular/dialect-react-native-nitro-sqlite - React Native Nitro SQLite dialect for sync
|
|
3
3
|
*
|
|
4
4
|
* Provides a Kysely dialect for React Native Nitro SQLite (react-native-nitro-sqlite)
|
|
5
|
-
* with SerializePlugin for automatic JSON serialization/deserialization.
|
|
6
5
|
* SQLite-compatible — use with @syncular/server-dialect-sqlite.
|
|
7
6
|
*
|
|
8
7
|
* Implements a custom Kysely Driver that wraps react-native-nitro-sqlite's API
|
|
9
8
|
* into the promise-based interface Kysely expects.
|
|
10
9
|
*/
|
|
11
|
-
import { SerializePlugin } from '@syncular/core';
|
|
12
10
|
import type { DatabaseIntrospector, Dialect, DialectAdapter, Driver, QueryCompiler } from 'kysely';
|
|
13
11
|
import { Kysely } from 'kysely';
|
|
14
12
|
import type { NitroSQLiteConnection, NitroSQLiteConnectionOptions } from 'react-native-nitro-sqlite';
|
|
@@ -28,7 +26,7 @@ interface NitroSqliteInstanceOptions {
|
|
|
28
26
|
}
|
|
29
27
|
export type NitroSqliteOptions = NitroSqliteNameOptions | NitroSqliteInstanceOptions;
|
|
30
28
|
/**
|
|
31
|
-
* Create a Kysely instance with React Native Nitro SQLite dialect
|
|
29
|
+
* Create a Kysely instance with React Native Nitro SQLite dialect.
|
|
32
30
|
*
|
|
33
31
|
* @example
|
|
34
32
|
* import { open } from 'react-native-nitro-sqlite';
|
|
@@ -44,13 +42,9 @@ export type NitroSqliteOptions = NitroSqliteNameOptions | NitroSqliteInstanceOpt
|
|
|
44
42
|
*/
|
|
45
43
|
export declare function createNitroSqliteDb<T>(options: NitroSqliteOptions): Kysely<T>;
|
|
46
44
|
/**
|
|
47
|
-
* Create the Nitro SQLite dialect directly
|
|
45
|
+
* Create the Nitro SQLite dialect directly.
|
|
48
46
|
*/
|
|
49
47
|
export declare function createNitroSqliteDialect(options: NitroSqliteOptions): NitroSqliteDialect;
|
|
50
|
-
/**
|
|
51
|
-
* Create a SerializePlugin instance.
|
|
52
|
-
*/
|
|
53
|
-
export declare function createSerializePlugin(): SerializePlugin;
|
|
54
48
|
declare class NitroSqliteDialect implements Dialect {
|
|
55
49
|
#private;
|
|
56
50
|
constructor(options: NitroSqliteOptions);
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAEV,oBAAoB,EACpB,OAAO,EACP,cAAc,EACd,MAAM,EACN,aAAa,EAGd,MAAM,QAAQ,CAAC;AAChB,OAAO,EAEL,MAAM,EAIP,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAE7B,MAAM,2BAA2B,CAAC;AAEnC,4DAA4D;AAC5D,KAAK,eAAe,GAAG,CACrB,OAAO,EAAE,4BAA4B,KAClC,qBAAqB,CAAC;AAE3B,UAAU,sBAAsB;IAC9B,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,EAAE,eAAe,CAAC;IACtB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,0BAA0B;IAClC,iDAAiD;IACjD,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AAED,MAAM,MAAM,kBAAkB,GAC1B,sBAAsB,GACtB,0BAA0B,CAAC;AAE/B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAAC,CAAC,CAAC,CAI7E;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,kBAAkB,GAC1B,kBAAkB,CAEpB;AAMD,cAAM,kBAAmB,YAAW,OAAO;;IAGzC,YAAY,OAAO,EAAE,kBAAkB,EAEtC;IAED,aAAa,IAAI,cAAc,CAE9B;IAED,YAAY,IAAI,MAAM,CAErB;IAED,mBAAmB,IAAI,aAAa,CAEnC;IAED,kBAAkB,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,oBAAoB,CAE5D;CACF"}
|
package/dist/index.js
CHANGED
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
* @syncular/dialect-react-native-nitro-sqlite - React Native Nitro SQLite dialect for sync
|
|
3
3
|
*
|
|
4
4
|
* Provides a Kysely dialect for React Native Nitro SQLite (react-native-nitro-sqlite)
|
|
5
|
-
* with SerializePlugin for automatic JSON serialization/deserialization.
|
|
6
5
|
* SQLite-compatible — use with @syncular/server-dialect-sqlite.
|
|
7
6
|
*
|
|
8
7
|
* Implements a custom Kysely Driver that wraps react-native-nitro-sqlite's API
|
|
9
8
|
* into the promise-based interface Kysely expects.
|
|
10
9
|
*/
|
|
11
|
-
import { SerializePlugin } from '@syncular/core';
|
|
12
10
|
import { CompiledQuery, Kysely, SqliteAdapter, SqliteIntrospector, SqliteQueryCompiler, } from 'kysely';
|
|
13
11
|
/**
|
|
14
|
-
* Create a Kysely instance with React Native Nitro SQLite dialect
|
|
12
|
+
* Create a Kysely instance with React Native Nitro SQLite dialect.
|
|
15
13
|
*
|
|
16
14
|
* @example
|
|
17
15
|
* import { open } from 'react-native-nitro-sqlite';
|
|
@@ -28,21 +26,14 @@ import { CompiledQuery, Kysely, SqliteAdapter, SqliteIntrospector, SqliteQueryCo
|
|
|
28
26
|
export function createNitroSqliteDb(options) {
|
|
29
27
|
return new Kysely({
|
|
30
28
|
dialect: createNitroSqliteDialect(options),
|
|
31
|
-
plugins: [new SerializePlugin()],
|
|
32
29
|
});
|
|
33
30
|
}
|
|
34
31
|
/**
|
|
35
|
-
* Create the Nitro SQLite dialect directly
|
|
32
|
+
* Create the Nitro SQLite dialect directly.
|
|
36
33
|
*/
|
|
37
34
|
export function createNitroSqliteDialect(options) {
|
|
38
35
|
return new NitroSqliteDialect(options);
|
|
39
36
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Create a SerializePlugin instance.
|
|
42
|
-
*/
|
|
43
|
-
export function createSerializePlugin() {
|
|
44
|
-
return new SerializePlugin();
|
|
45
|
-
}
|
|
46
37
|
// ---------------------------------------------------------------------------
|
|
47
38
|
// Kysely Dialect implementation for react-native-nitro-sqlite
|
|
48
39
|
// ---------------------------------------------------------------------------
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,OAAO,EACL,aAAa,EACb,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,QAAQ,CAAC;AA8BhB;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,mBAAmB,CAAI,OAA2B,EAAa;IAC7E,OAAO,IAAI,MAAM,CAAI;QACnB,OAAO,EAAE,wBAAwB,CAAC,OAAO,CAAC;KAC3C,CAAC,CAAC;AAAA,CACJ;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAA2B,EACP;IACpB,OAAO,IAAI,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAAA,CACxC;AAED,8EAA8E;AAC9E,8DAA8D;AAC9D,8EAA8E;AAE9E,M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AC,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAClE,CAAC;QACJ,CAAC;QAED,2DAAyD;QACzD,OAAO;YACL,IAAI,EAAE,EAAE;YACR,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC;YACjD,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC;SACvC,CAAC;IAAA,CACH;IAED,WAAW,CACT,cAA6B,EAC7B,UAAmB,EACoB;QACvC,MAAM,IAAI,KAAK,CACb,6DAA6D,CAC9D,CAAC;IAAA,CACH;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncular/dialect-react-native-nitro-sqlite",
|
|
3
|
-
"version": "0.0.2-
|
|
3
|
+
"version": "0.0.2-133",
|
|
4
4
|
"description": "React Native Nitro SQLite dialect for the Syncular client",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Benjamin Kniffler",
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
"build": "tsgo",
|
|
43
43
|
"release": "bunx syncular-publish"
|
|
44
44
|
},
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@syncular/core": "0.0.2-128"
|
|
47
|
-
},
|
|
45
|
+
"dependencies": {},
|
|
48
46
|
"peerDependencies": {
|
|
49
47
|
"kysely": "^0.28.0",
|
|
50
48
|
"react-native-nitro-sqlite": ">=0.1.0"
|
package/src/index.ts
CHANGED
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
* @syncular/dialect-react-native-nitro-sqlite - React Native Nitro SQLite dialect for sync
|
|
3
3
|
*
|
|
4
4
|
* Provides a Kysely dialect for React Native Nitro SQLite (react-native-nitro-sqlite)
|
|
5
|
-
* with SerializePlugin for automatic JSON serialization/deserialization.
|
|
6
5
|
* SQLite-compatible — use with @syncular/server-dialect-sqlite.
|
|
7
6
|
*
|
|
8
7
|
* Implements a custom Kysely Driver that wraps react-native-nitro-sqlite's API
|
|
9
8
|
* into the promise-based interface Kysely expects.
|
|
10
9
|
*/
|
|
11
10
|
|
|
12
|
-
import { SerializePlugin } from '@syncular/core';
|
|
13
11
|
import type {
|
|
14
12
|
DatabaseConnection,
|
|
15
13
|
DatabaseIntrospector,
|
|
@@ -57,7 +55,7 @@ export type NitroSqliteOptions =
|
|
|
57
55
|
| NitroSqliteInstanceOptions;
|
|
58
56
|
|
|
59
57
|
/**
|
|
60
|
-
* Create a Kysely instance with React Native Nitro SQLite dialect
|
|
58
|
+
* Create a Kysely instance with React Native Nitro SQLite dialect.
|
|
61
59
|
*
|
|
62
60
|
* @example
|
|
63
61
|
* import { open } from 'react-native-nitro-sqlite';
|
|
@@ -74,12 +72,11 @@ export type NitroSqliteOptions =
|
|
|
74
72
|
export function createNitroSqliteDb<T>(options: NitroSqliteOptions): Kysely<T> {
|
|
75
73
|
return new Kysely<T>({
|
|
76
74
|
dialect: createNitroSqliteDialect(options),
|
|
77
|
-
plugins: [new SerializePlugin()],
|
|
78
75
|
});
|
|
79
76
|
}
|
|
80
77
|
|
|
81
78
|
/**
|
|
82
|
-
* Create the Nitro SQLite dialect directly
|
|
79
|
+
* Create the Nitro SQLite dialect directly.
|
|
83
80
|
*/
|
|
84
81
|
export function createNitroSqliteDialect(
|
|
85
82
|
options: NitroSqliteOptions
|
|
@@ -87,13 +84,6 @@ export function createNitroSqliteDialect(
|
|
|
87
84
|
return new NitroSqliteDialect(options);
|
|
88
85
|
}
|
|
89
86
|
|
|
90
|
-
/**
|
|
91
|
-
* Create a SerializePlugin instance.
|
|
92
|
-
*/
|
|
93
|
-
export function createSerializePlugin(): SerializePlugin {
|
|
94
|
-
return new SerializePlugin();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
87
|
// ---------------------------------------------------------------------------
|
|
98
88
|
// Kysely Dialect implementation for react-native-nitro-sqlite
|
|
99
89
|
// ---------------------------------------------------------------------------
|