@effect/sql-sqlite-react-native 4.0.0 → 4.0.2
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/ai-docs/package.json +2 -2
- package/ai-docs/tsconfig.json +2 -1
- package/dist/SqliteClient.d.ts +10 -0
- package/dist/SqliteClient.d.ts.map +1 -1
- package/dist/SqliteClient.js +8 -0
- package/dist/SqliteClient.js.map +1 -1
- package/dist/SqliteMigrator.d.ts +3 -0
- package/dist/SqliteMigrator.d.ts.map +1 -1
- package/dist/SqliteMigrator.js +2 -0
- package/dist/SqliteMigrator.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/SqliteClient.ts +11 -0
- package/src/SqliteMigrator.ts +3 -0
- package/src/index.ts +3 -0
package/ai-docs/package.json
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@effect/sql-sqlite-wasm": "workspace:*",
|
|
28
28
|
"@effect/vitest": "workspace:*",
|
|
29
29
|
"effect": "workspace:*",
|
|
30
|
-
"hono": "^4.13.
|
|
31
|
-
"nodemailer": "^10.0.
|
|
30
|
+
"hono": "^4.13.12",
|
|
31
|
+
"nodemailer": "^10.0.14"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/nodemailer": "^8.0.2"
|
package/ai-docs/tsconfig.json
CHANGED
package/dist/SqliteClient.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import * as Client from "effect/sql/SqlClient";
|
|
|
8
8
|
/**
|
|
9
9
|
* Runtime identifier attached to SQLite React Native client values.
|
|
10
10
|
*
|
|
11
|
+
* @stability unstable
|
|
11
12
|
* @category type IDs
|
|
12
13
|
* @since 4.0.0
|
|
13
14
|
*/
|
|
@@ -15,6 +16,7 @@ export declare const TypeId: TypeId;
|
|
|
15
16
|
/**
|
|
16
17
|
* Type-level identifier for SQLite React Native client values.
|
|
17
18
|
*
|
|
19
|
+
* @stability unstable
|
|
18
20
|
* @category type IDs
|
|
19
21
|
* @since 4.0.0
|
|
20
22
|
*/
|
|
@@ -22,6 +24,7 @@ export type TypeId = "~@effect/sql-sqlite-react-native/SqliteClient";
|
|
|
22
24
|
/**
|
|
23
25
|
* React Native SQLite client service interface, extending `SqlClient` with its configuration and marking `updateValues` as unsupported for SQLite.
|
|
24
26
|
*
|
|
27
|
+
* @stability unstable
|
|
25
28
|
* @category services
|
|
26
29
|
* @since 4.0.0
|
|
27
30
|
*/
|
|
@@ -34,6 +37,7 @@ export interface SqliteClient extends Client.SqlClient {
|
|
|
34
37
|
/**
|
|
35
38
|
* Service tag for the React Native SQLite client.
|
|
36
39
|
*
|
|
40
|
+
* @stability unstable
|
|
37
41
|
* @category services
|
|
38
42
|
* @since 4.0.0
|
|
39
43
|
*/
|
|
@@ -41,6 +45,7 @@ export declare const SqliteClient: Context.Service<SqliteClient, SqliteClient>;
|
|
|
41
45
|
/**
|
|
42
46
|
* Configuration for a React Native SQLite client, including the database filename, optional location and encryption key, span attributes, and query/result name transforms.
|
|
43
47
|
*
|
|
48
|
+
* @stability unstable
|
|
44
49
|
* @category models
|
|
45
50
|
* @since 4.0.0
|
|
46
51
|
*/
|
|
@@ -60,6 +65,7 @@ export interface SqliteClientConfig {
|
|
|
60
65
|
* Use to switch React Native SQLite query execution to the asynchronous driver
|
|
61
66
|
* API for a scoped effect.
|
|
62
67
|
*
|
|
68
|
+
* @stability unstable
|
|
63
69
|
* @category services
|
|
64
70
|
* @since 4.0.0
|
|
65
71
|
*/
|
|
@@ -67,6 +73,7 @@ export declare const AsyncQuery: Context.Reference<boolean>;
|
|
|
67
73
|
/**
|
|
68
74
|
* Runs an effect with `AsyncQuery` enabled, causing React Native SQLite queries in that effect to use the asynchronous driver API.
|
|
69
75
|
*
|
|
76
|
+
* @stability unstable
|
|
70
77
|
* @category providing services
|
|
71
78
|
* @since 4.0.0
|
|
72
79
|
*/
|
|
@@ -74,6 +81,7 @@ export declare const withAsyncQuery: <R, E, A>(effect: Effect.Effect<A, E, R>) =
|
|
|
74
81
|
/**
|
|
75
82
|
* Creates a scoped React Native SQLite client from the supplied configuration, using a single serialized connection and honoring `AsyncQuery` for query execution.
|
|
76
83
|
*
|
|
84
|
+
* @stability unstable
|
|
77
85
|
* @category constructors
|
|
78
86
|
* @since 4.0.0
|
|
79
87
|
*/
|
|
@@ -81,6 +89,7 @@ export declare const make: (options: SqliteClientConfig) => Effect.Effect<Sqlite
|
|
|
81
89
|
/**
|
|
82
90
|
* Builds a layer from an Effect `Config` value, providing both the React Native `SqliteClient` service and the generic `SqlClient` service.
|
|
83
91
|
*
|
|
92
|
+
* @stability unstable
|
|
84
93
|
* @category layers
|
|
85
94
|
* @since 4.0.0
|
|
86
95
|
*/
|
|
@@ -88,6 +97,7 @@ export declare const layerConfig: (config: Config.Wrap<SqliteClientConfig>) => L
|
|
|
88
97
|
/**
|
|
89
98
|
* Builds a layer from a React Native SQLite client configuration, providing both `SqliteClient` and the generic `SqlClient` service.
|
|
90
99
|
*
|
|
100
|
+
* @stability unstable
|
|
91
101
|
* @category layers
|
|
92
102
|
* @since 4.0.0
|
|
93
103
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteClient.d.ts","sourceRoot":"","sources":["../src/SqliteClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SqliteClient.d.ts","sourceRoot":"","sources":["../src/SqliteClient.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAA;AAC1D,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAE1C,OAAO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ACN,kBAAkB,KAC1B,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,UAAU,CA8GrE,CAAA;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,WACd,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,KACtC,KAAK,CAAC,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAUzB,CAAA;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,WACR,kBAAkB,KACzB,KAAK,CAAC,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC,SAAS,CAML,CAAA"}
|
package/dist/SqliteClient.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* to the driver's asynchronous query API. Streaming queries and `updateValues`
|
|
10
10
|
* are not supported by this driver.
|
|
11
11
|
*
|
|
12
|
+
* @stability unstable
|
|
12
13
|
* @since 4.0.0
|
|
13
14
|
*/
|
|
14
15
|
import * as Sqlite from "@op-engineering/op-sqlite";
|
|
@@ -32,6 +33,7 @@ const classifyError = (cause, message, operation) => classifySqliteError(cause,
|
|
|
32
33
|
/**
|
|
33
34
|
* Runtime identifier attached to SQLite React Native client values.
|
|
34
35
|
*
|
|
36
|
+
* @stability unstable
|
|
35
37
|
* @category type IDs
|
|
36
38
|
* @since 4.0.0
|
|
37
39
|
*/
|
|
@@ -39,6 +41,7 @@ export const TypeId = "~@effect/sql-sqlite-react-native/SqliteClient";
|
|
|
39
41
|
/**
|
|
40
42
|
* Service tag for the React Native SQLite client.
|
|
41
43
|
*
|
|
44
|
+
* @stability unstable
|
|
42
45
|
* @category services
|
|
43
46
|
* @since 4.0.0
|
|
44
47
|
*/
|
|
@@ -51,6 +54,7 @@ export const SqliteClient = /*#__PURE__*/Context.Service("@effect/sql-sqlite-rea
|
|
|
51
54
|
* Use to switch React Native SQLite query execution to the asynchronous driver
|
|
52
55
|
* API for a scoped effect.
|
|
53
56
|
*
|
|
57
|
+
* @stability unstable
|
|
54
58
|
* @category services
|
|
55
59
|
* @since 4.0.0
|
|
56
60
|
*/
|
|
@@ -60,6 +64,7 @@ export const AsyncQuery = /*#__PURE__*/Context.Reference("@effect/sql-sqlite-rea
|
|
|
60
64
|
/**
|
|
61
65
|
* Runs an effect with `AsyncQuery` enabled, causing React Native SQLite queries in that effect to use the asynchronous driver API.
|
|
62
66
|
*
|
|
67
|
+
* @stability unstable
|
|
63
68
|
* @category providing services
|
|
64
69
|
* @since 4.0.0
|
|
65
70
|
*/
|
|
@@ -67,6 +72,7 @@ export const withAsyncQuery = effect => Effect.provideService(effect, AsyncQuery
|
|
|
67
72
|
/**
|
|
68
73
|
* Creates a scoped React Native SQLite client from the supplied configuration, using a single serialized connection and honoring `AsyncQuery` for query execution.
|
|
69
74
|
*
|
|
75
|
+
* @stability unstable
|
|
70
76
|
* @category constructors
|
|
71
77
|
* @since 4.0.0
|
|
72
78
|
*/
|
|
@@ -162,6 +168,7 @@ export const make = options => Effect.gen(function* () {
|
|
|
162
168
|
/**
|
|
163
169
|
* Builds a layer from an Effect `Config` value, providing both the React Native `SqliteClient` service and the generic `SqlClient` service.
|
|
164
170
|
*
|
|
171
|
+
* @stability unstable
|
|
165
172
|
* @category layers
|
|
166
173
|
* @since 4.0.0
|
|
167
174
|
*/
|
|
@@ -169,6 +176,7 @@ export const layerConfig = config => Layer.effectContext(Config.unwrap(config).p
|
|
|
169
176
|
/**
|
|
170
177
|
* Builds a layer from a React Native SQLite client configuration, providing both `SqliteClient` and the generic `SqlClient` service.
|
|
171
178
|
*
|
|
179
|
+
* @stability unstable
|
|
172
180
|
* @category layers
|
|
173
181
|
* @since 4.0.0
|
|
174
182
|
*/
|
package/dist/SqliteClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteClient.js","names":[],"sources":["../src/SqliteClient.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
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CAAC,IAAI,CACxB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EACpB,MAAM,CAAC,GAAG,CAAE,MAAM,IAChB,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,IAAI,CACrC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CACtC,CACF,CACF,CACF,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAEzC;;;;;;;AAOA,OAAO,MAAM,KAAK,GAChB,MAA0B,IAE1B,KAAK,CAAC,aAAa,CACjB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,EAAG,MAAM,IAC9B,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,IAAI,CACrC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CACtC,CAAC,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC","ignoreList":[]}
|
package/dist/SqliteMigrator.d.ts
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* suspension or process death, so keep migrations transaction-aware and avoid
|
|
18
18
|
* assuming a fresh database on every launch.
|
|
19
19
|
*
|
|
20
|
+
* @stability unstable
|
|
20
21
|
* @since 4.0.0
|
|
21
22
|
*/
|
|
22
23
|
import type * as Effect from "effect/Effect";
|
|
@@ -31,6 +32,7 @@ export * from "effect/sql/Migrator";
|
|
|
31
32
|
/**
|
|
32
33
|
* Runs SQL migrations for a React Native SQLite database using the shared `Migrator` implementation and the current `SqlClient`.
|
|
33
34
|
*
|
|
35
|
+
* @stability unstable
|
|
34
36
|
* @category running
|
|
35
37
|
* @since 4.0.0
|
|
36
38
|
*/
|
|
@@ -38,6 +40,7 @@ export declare const run: <R>(options: Migrator.MigratorOptions<R>) => Effect.Ef
|
|
|
38
40
|
/**
|
|
39
41
|
* Creates a layer that runs the configured React Native SQLite migrations during layer construction and provides no services.
|
|
40
42
|
*
|
|
43
|
+
* @stability unstable
|
|
41
44
|
* @category layers
|
|
42
45
|
* @since 4.0.0
|
|
43
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteMigrator.d.ts","sourceRoot":"","sources":["../src/SqliteMigrator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SqliteMigrator.d.ts","sourceRoot":"","sources":["../src/SqliteMigrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;GAEG;AACH,cAAc,qBAAqB,CAAA;AAEnC;;;;;;GAMG;AACH,eAAO,MAAM,GAAG,EAAE,CAAC,CAAC,EAClB,OAAO,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,KACjC,MAAM,CAAC,MAAM,CAChB,aAAa,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAClD,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAClC,MAAM,CAAC,SAAS,GAAG,CAAC,CACD,CAAA;AAErB;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,WACZ,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,KACnC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC,GAAG,MAAM,CAAC,SAAS,CAAsC,CAAA"}
|
package/dist/SqliteMigrator.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "effect/sql/Migrator";
|
|
|
7
7
|
/**
|
|
8
8
|
* Runs SQL migrations for a React Native SQLite database using the shared `Migrator` implementation and the current `SqlClient`.
|
|
9
9
|
*
|
|
10
|
+
* @stability unstable
|
|
10
11
|
* @category running
|
|
11
12
|
* @since 4.0.0
|
|
12
13
|
*/
|
|
@@ -14,6 +15,7 @@ export const run = /*#__PURE__*/Migrator.make({});
|
|
|
14
15
|
/**
|
|
15
16
|
* Creates a layer that runs the configured React Native SQLite migrations during layer construction and provides no services.
|
|
16
17
|
*
|
|
18
|
+
* @stability unstable
|
|
17
19
|
* @category layers
|
|
18
20
|
* @since 4.0.0
|
|
19
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteMigrator.js","names":[],"sources":["../src/SqliteMigrator.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"file":"SqliteMigrator.js","names":[],"sources":["../src/SqliteMigrator.ts"],"sourcesContent":[null],"mappings":"AAuBA,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,OAAO,KAAK,QAAQ,MAAM,qBAAqB;AAI/C;;;AAGA,cAAc,qBAAqB;AAEnC;;;;;;;AAOA,OAAO,MAAM,GAAG,gBAMZ,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;AAErB;;;;;;;AAOA,OAAO,MAAM,KAAK,GAChB,OAAoC,IAC6C,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC","ignoreList":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @stability unstable
|
|
2
3
|
* @since 4.0.0
|
|
3
4
|
*/
|
|
4
5
|
/**
|
|
6
|
+
* @stability unstable
|
|
5
7
|
* @since 4.0.0
|
|
6
8
|
*/
|
|
7
9
|
export * as SqliteClient from "./SqliteClient.ts";
|
|
8
10
|
/**
|
|
11
|
+
* @stability unstable
|
|
9
12
|
* @since 4.0.0
|
|
10
13
|
*/
|
|
11
14
|
export * as SqliteMigrator from "./SqliteMigrator.ts";
|
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;;;GAGG;AAIH;;;GAGG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAEjD;;;GAGG;AACH,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @stability unstable
|
|
2
3
|
* @since 4.0.0
|
|
3
4
|
*/
|
|
4
5
|
// @barrel: Auto-generated exports. Do not edit manually.
|
|
5
6
|
/**
|
|
7
|
+
* @stability unstable
|
|
6
8
|
* @since 4.0.0
|
|
7
9
|
*/
|
|
8
10
|
export * as SqliteClient from "./SqliteClient.js";
|
|
9
11
|
/**
|
|
12
|
+
* @stability unstable
|
|
10
13
|
* @since 4.0.0
|
|
11
14
|
*/
|
|
12
15
|
export * as SqliteMigrator from "./SqliteMigrator.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;AAKA;AAEA;;;;AAIA,OAAO,KAAK,YAAY,MAAM,mBAAmB;AAEjD;;;;AAIA,OAAO,KAAK,cAAc,MAAM,qBAAqB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/sql-sqlite-react-native",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A SQLite toolkit for Effect",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@op-engineering/op-sqlite": "^18.2.5",
|
|
51
|
-
"effect": "^4.0.
|
|
51
|
+
"effect": "^4.0.2"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@op-engineering/op-sqlite": ">=17.1.2 <18.0.0",
|
|
55
|
-
"effect": "^4.0.
|
|
55
|
+
"effect": "^4.0.2"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"codegen": "effect-utils codegen",
|
package/src/SqliteClient.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* to the driver's asynchronous query API. Streaming queries and `updateValues`
|
|
10
10
|
* are not supported by this driver.
|
|
11
11
|
*
|
|
12
|
+
* @stability unstable
|
|
12
13
|
* @since 4.0.0
|
|
13
14
|
*/
|
|
14
15
|
import * as Sqlite from "@op-engineering/op-sqlite"
|
|
@@ -46,6 +47,7 @@ const classifyError = (cause: unknown, message: string, operation: string) =>
|
|
|
46
47
|
/**
|
|
47
48
|
* Runtime identifier attached to SQLite React Native client values.
|
|
48
49
|
*
|
|
50
|
+
* @stability unstable
|
|
49
51
|
* @category type IDs
|
|
50
52
|
* @since 4.0.0
|
|
51
53
|
*/
|
|
@@ -54,6 +56,7 @@ export const TypeId: TypeId = "~@effect/sql-sqlite-react-native/SqliteClient"
|
|
|
54
56
|
/**
|
|
55
57
|
* Type-level identifier for SQLite React Native client values.
|
|
56
58
|
*
|
|
59
|
+
* @stability unstable
|
|
57
60
|
* @category type IDs
|
|
58
61
|
* @since 4.0.0
|
|
59
62
|
*/
|
|
@@ -62,6 +65,7 @@ export type TypeId = "~@effect/sql-sqlite-react-native/SqliteClient"
|
|
|
62
65
|
/**
|
|
63
66
|
* React Native SQLite client service interface, extending `SqlClient` with its configuration and marking `updateValues` as unsupported for SQLite.
|
|
64
67
|
*
|
|
68
|
+
* @stability unstable
|
|
65
69
|
* @category services
|
|
66
70
|
* @since 4.0.0
|
|
67
71
|
*/
|
|
@@ -76,6 +80,7 @@ export interface SqliteClient extends Client.SqlClient {
|
|
|
76
80
|
/**
|
|
77
81
|
* Service tag for the React Native SQLite client.
|
|
78
82
|
*
|
|
83
|
+
* @stability unstable
|
|
79
84
|
* @category services
|
|
80
85
|
* @since 4.0.0
|
|
81
86
|
*/
|
|
@@ -84,6 +89,7 @@ export const SqliteClient = Context.Service<SqliteClient>("@effect/sql-sqlite-re
|
|
|
84
89
|
/**
|
|
85
90
|
* Configuration for a React Native SQLite client, including the database filename, optional location and encryption key, span attributes, and query/result name transforms.
|
|
86
91
|
*
|
|
92
|
+
* @stability unstable
|
|
87
93
|
* @category models
|
|
88
94
|
* @since 4.0.0
|
|
89
95
|
*/
|
|
@@ -104,6 +110,7 @@ export interface SqliteClientConfig {
|
|
|
104
110
|
* Use to switch React Native SQLite query execution to the asynchronous driver
|
|
105
111
|
* API for a scoped effect.
|
|
106
112
|
*
|
|
113
|
+
* @stability unstable
|
|
107
114
|
* @category services
|
|
108
115
|
* @since 4.0.0
|
|
109
116
|
*/
|
|
@@ -115,6 +122,7 @@ export const AsyncQuery = Context.Reference<boolean>(
|
|
|
115
122
|
/**
|
|
116
123
|
* Runs an effect with `AsyncQuery` enabled, causing React Native SQLite queries in that effect to use the asynchronous driver API.
|
|
117
124
|
*
|
|
125
|
+
* @stability unstable
|
|
118
126
|
* @category providing services
|
|
119
127
|
* @since 4.0.0
|
|
120
128
|
*/
|
|
@@ -126,6 +134,7 @@ interface SqliteConnection extends Connection {}
|
|
|
126
134
|
/**
|
|
127
135
|
* Creates a scoped React Native SQLite client from the supplied configuration, using a single serialized connection and honoring `AsyncQuery` for query execution.
|
|
128
136
|
*
|
|
137
|
+
* @stability unstable
|
|
129
138
|
* @category constructors
|
|
130
139
|
* @since 4.0.0
|
|
131
140
|
*/
|
|
@@ -246,6 +255,7 @@ export const make = (
|
|
|
246
255
|
/**
|
|
247
256
|
* Builds a layer from an Effect `Config` value, providing both the React Native `SqliteClient` service and the generic `SqlClient` service.
|
|
248
257
|
*
|
|
258
|
+
* @stability unstable
|
|
249
259
|
* @category layers
|
|
250
260
|
* @since 4.0.0
|
|
251
261
|
*/
|
|
@@ -266,6 +276,7 @@ export const layerConfig = (
|
|
|
266
276
|
/**
|
|
267
277
|
* Builds a layer from a React Native SQLite client configuration, providing both `SqliteClient` and the generic `SqlClient` service.
|
|
268
278
|
*
|
|
279
|
+
* @stability unstable
|
|
269
280
|
* @category layers
|
|
270
281
|
* @since 4.0.0
|
|
271
282
|
*/
|
package/src/SqliteMigrator.ts
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* suspension or process death, so keep migrations transaction-aware and avoid
|
|
18
18
|
* assuming a fresh database on every launch.
|
|
19
19
|
*
|
|
20
|
+
* @stability unstable
|
|
20
21
|
* @since 4.0.0
|
|
21
22
|
*/
|
|
22
23
|
import type * as Effect from "effect/Effect"
|
|
@@ -33,6 +34,7 @@ export * from "effect/sql/Migrator"
|
|
|
33
34
|
/**
|
|
34
35
|
* Runs SQL migrations for a React Native SQLite database using the shared `Migrator` implementation and the current `SqlClient`.
|
|
35
36
|
*
|
|
37
|
+
* @stability unstable
|
|
36
38
|
* @category running
|
|
37
39
|
* @since 4.0.0
|
|
38
40
|
*/
|
|
@@ -47,6 +49,7 @@ export const run: <R>(
|
|
|
47
49
|
/**
|
|
48
50
|
* Creates a layer that runs the configured React Native SQLite migrations during layer construction and provides no services.
|
|
49
51
|
*
|
|
52
|
+
* @stability unstable
|
|
50
53
|
* @category layers
|
|
51
54
|
* @since 4.0.0
|
|
52
55
|
*/
|
package/src/index.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @stability unstable
|
|
2
3
|
* @since 4.0.0
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
// @barrel: Auto-generated exports. Do not edit manually.
|
|
6
7
|
|
|
7
8
|
/**
|
|
9
|
+
* @stability unstable
|
|
8
10
|
* @since 4.0.0
|
|
9
11
|
*/
|
|
10
12
|
export * as SqliteClient from "./SqliteClient.ts"
|
|
11
13
|
|
|
12
14
|
/**
|
|
15
|
+
* @stability unstable
|
|
13
16
|
* @since 4.0.0
|
|
14
17
|
*/
|
|
15
18
|
export * as SqliteMigrator from "./SqliteMigrator.ts"
|