@evolu/common 8.9.0 → 8.11.0
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/src/Bytes.d.ts +647 -0
- package/dist/src/Bytes.d.ts.map +1 -0
- package/dist/src/{Binary.js → Bytes.js} +266 -16
- package/dist/src/Config.d.ts +142 -0
- package/dist/src/Config.d.ts.map +1 -0
- package/dist/src/Config.js +181 -0
- package/dist/src/Console.d.ts +62 -7
- package/dist/src/Console.d.ts.map +1 -1
- package/dist/src/Console.js +20 -4
- package/dist/src/Crypto.d.ts +76 -4
- package/dist/src/Crypto.d.ts.map +1 -1
- package/dist/src/Crypto.js +55 -4
- package/dist/src/Error.d.ts +45 -0
- package/dist/src/Error.d.ts.map +1 -1
- package/dist/src/Error.js +69 -0
- package/dist/src/Fs.d.ts +376 -0
- package/dist/src/Fs.d.ts.map +1 -0
- package/dist/src/Fs.js +113 -0
- package/dist/src/Identicon.d.ts +2 -2
- package/dist/src/Identicon.js +2 -2
- package/dist/src/LeakDetector.d.ts +22 -3
- package/dist/src/LeakDetector.d.ts.map +1 -1
- package/dist/src/LeakDetector.js +12 -2
- package/dist/src/LockManager.d.ts +8 -0
- package/dist/src/LockManager.d.ts.map +1 -1
- package/dist/src/LockManager.js +6 -0
- package/dist/src/Number.d.ts +50 -7
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +47 -8
- package/dist/src/Object.d.ts +32 -0
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/Object.js +46 -0
- package/dist/src/Platform.d.ts +47 -7
- package/dist/src/Platform.d.ts.map +1 -1
- package/dist/src/Platform.js +24 -5
- package/dist/src/Random.d.ts +25 -2
- package/dist/src/Random.d.ts.map +1 -1
- package/dist/src/Random.js +14 -2
- package/dist/src/Resource.d.ts +156 -1
- package/dist/src/Resource.d.ts.map +1 -1
- package/dist/src/Resource.js +201 -72
- package/dist/src/Schedule.d.ts +11 -10
- package/dist/src/Schedule.d.ts.map +1 -1
- package/dist/src/Schedule.js +1 -1
- package/dist/src/Sqlite.d.ts +132 -16
- package/dist/src/Sqlite.d.ts.map +1 -1
- package/dist/src/Sqlite.js +64 -10
- package/dist/src/Task.d.ts +15 -4
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +41 -15
- package/dist/src/Test.d.ts +9 -0
- package/dist/src/Test.d.ts.map +1 -1
- package/dist/src/Test.js +4 -0
- package/dist/src/Time.d.ts +179 -20
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +95 -6
- package/dist/src/Type.d.ts +3056 -1539
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +2548 -584
- package/dist/src/WebSocket.d.ts +164 -13
- package/dist/src/WebSocket.d.ts.map +1 -1
- package/dist/src/WebSocket.js +133 -24
- package/dist/src/Worker.d.ts +90 -8
- package/dist/src/Worker.d.ts.map +1 -1
- package/dist/src/Worker.js +28 -2
- package/dist/src/index.d.ts +9 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -4
- package/dist/src/intl/_en.d.ts +24 -1
- package/dist/src/intl/_en.d.ts.map +1 -1
- package/dist/src/intl/_en.js +20 -0
- package/dist/src/intl/ar.d.ts +24 -1
- package/dist/src/intl/ar.d.ts.map +1 -1
- package/dist/src/intl/ar.js +20 -0
- package/dist/src/intl/bn.d.ts +24 -1
- package/dist/src/intl/bn.d.ts.map +1 -1
- package/dist/src/intl/bn.js +20 -0
- package/dist/src/intl/ca.d.ts +24 -1
- package/dist/src/intl/ca.d.ts.map +1 -1
- package/dist/src/intl/ca.js +20 -0
- package/dist/src/intl/cs.d.ts +24 -1
- package/dist/src/intl/cs.d.ts.map +1 -1
- package/dist/src/intl/cs.js +20 -0
- package/dist/src/intl/da.d.ts +24 -1
- package/dist/src/intl/da.d.ts.map +1 -1
- package/dist/src/intl/da.js +20 -0
- package/dist/src/intl/de.d.ts +24 -1
- package/dist/src/intl/de.d.ts.map +1 -1
- package/dist/src/intl/de.js +20 -0
- package/dist/src/intl/el.d.ts +24 -1
- package/dist/src/intl/el.d.ts.map +1 -1
- package/dist/src/intl/el.js +20 -0
- package/dist/src/intl/es.d.ts +24 -1
- package/dist/src/intl/es.d.ts.map +1 -1
- package/dist/src/intl/es.js +20 -0
- package/dist/src/intl/fa.d.ts +24 -1
- package/dist/src/intl/fa.d.ts.map +1 -1
- package/dist/src/intl/fa.js +20 -0
- package/dist/src/intl/fi.d.ts +24 -1
- package/dist/src/intl/fi.d.ts.map +1 -1
- package/dist/src/intl/fi.js +20 -0
- package/dist/src/intl/fil.d.ts +24 -1
- package/dist/src/intl/fil.d.ts.map +1 -1
- package/dist/src/intl/fil.js +20 -0
- package/dist/src/intl/fr.d.ts +24 -1
- package/dist/src/intl/fr.d.ts.map +1 -1
- package/dist/src/intl/fr.js +20 -0
- package/dist/src/intl/he.d.ts +24 -1
- package/dist/src/intl/he.d.ts.map +1 -1
- package/dist/src/intl/he.js +20 -0
- package/dist/src/intl/hi.d.ts +24 -1
- package/dist/src/intl/hi.d.ts.map +1 -1
- package/dist/src/intl/hi.js +20 -0
- package/dist/src/intl/hr.d.ts +24 -1
- package/dist/src/intl/hr.d.ts.map +1 -1
- package/dist/src/intl/hr.js +20 -0
- package/dist/src/intl/hu.d.ts +22 -1
- package/dist/src/intl/hu.d.ts.map +1 -1
- package/dist/src/intl/hu.js +18 -0
- package/dist/src/intl/id.d.ts +24 -1
- package/dist/src/intl/id.d.ts.map +1 -1
- package/dist/src/intl/id.js +20 -0
- package/dist/src/intl/it.d.ts +24 -1
- package/dist/src/intl/it.d.ts.map +1 -1
- package/dist/src/intl/it.js +20 -0
- package/dist/src/intl/ja.d.ts +24 -1
- package/dist/src/intl/ja.d.ts.map +1 -1
- package/dist/src/intl/ja.js +20 -0
- package/dist/src/intl/ko.d.ts +24 -1
- package/dist/src/intl/ko.d.ts.map +1 -1
- package/dist/src/intl/ko.js +20 -0
- package/dist/src/intl/ml.d.ts +24 -1
- package/dist/src/intl/ml.d.ts.map +1 -1
- package/dist/src/intl/ml.js +20 -0
- package/dist/src/intl/mr.d.ts +24 -1
- package/dist/src/intl/mr.d.ts.map +1 -1
- package/dist/src/intl/mr.js +20 -0
- package/dist/src/intl/ms.d.ts +24 -1
- package/dist/src/intl/ms.d.ts.map +1 -1
- package/dist/src/intl/ms.js +20 -0
- package/dist/src/intl/nb.d.ts +22 -1
- package/dist/src/intl/nb.d.ts.map +1 -1
- package/dist/src/intl/nb.js +18 -0
- package/dist/src/intl/nl.d.ts +24 -1
- package/dist/src/intl/nl.d.ts.map +1 -1
- package/dist/src/intl/nl.js +20 -0
- package/dist/src/intl/pa.d.ts +24 -1
- package/dist/src/intl/pa.d.ts.map +1 -1
- package/dist/src/intl/pa.js +20 -0
- package/dist/src/intl/pl.d.ts +23 -0
- package/dist/src/intl/pl.d.ts.map +1 -1
- package/dist/src/intl/pl.js +20 -0
- package/dist/src/intl/pt-BR.d.ts +24 -1
- package/dist/src/intl/pt-BR.d.ts.map +1 -1
- package/dist/src/intl/pt-BR.js +20 -0
- package/dist/src/intl/pt.d.ts +24 -1
- package/dist/src/intl/pt.d.ts.map +1 -1
- package/dist/src/intl/pt.js +20 -0
- package/dist/src/intl/ro.d.ts +24 -1
- package/dist/src/intl/ro.d.ts.map +1 -1
- package/dist/src/intl/ro.js +20 -0
- package/dist/src/intl/sk.d.ts +24 -1
- package/dist/src/intl/sk.d.ts.map +1 -1
- package/dist/src/intl/sk.js +20 -0
- package/dist/src/intl/sl.d.ts +24 -1
- package/dist/src/intl/sl.d.ts.map +1 -1
- package/dist/src/intl/sl.js +20 -0
- package/dist/src/intl/sv.d.ts +24 -1
- package/dist/src/intl/sv.d.ts.map +1 -1
- package/dist/src/intl/sv.js +20 -0
- package/dist/src/intl/sw.d.ts +21 -0
- package/dist/src/intl/sw.d.ts.map +1 -1
- package/dist/src/intl/sw.js +18 -0
- package/dist/src/intl/ta.d.ts +24 -1
- package/dist/src/intl/ta.d.ts.map +1 -1
- package/dist/src/intl/ta.js +20 -0
- package/dist/src/intl/te.d.ts +24 -1
- package/dist/src/intl/te.d.ts.map +1 -1
- package/dist/src/intl/te.js +20 -0
- package/dist/src/intl/th.d.ts +24 -1
- package/dist/src/intl/th.d.ts.map +1 -1
- package/dist/src/intl/th.js +20 -0
- package/dist/src/intl/tr.d.ts +24 -1
- package/dist/src/intl/tr.d.ts.map +1 -1
- package/dist/src/intl/tr.js +20 -0
- package/dist/src/intl/uk.d.ts +80 -57
- package/dist/src/intl/uk.d.ts.map +1 -1
- package/dist/src/intl/uk.js +174 -149
- package/dist/src/intl/ur.d.ts +24 -1
- package/dist/src/intl/ur.d.ts.map +1 -1
- package/dist/src/intl/ur.js +20 -0
- package/dist/src/intl/vi.d.ts +24 -1
- package/dist/src/intl/vi.d.ts.map +1 -1
- package/dist/src/intl/vi.js +20 -0
- package/dist/src/intl/zh-CN.d.ts +24 -1
- package/dist/src/intl/zh-CN.d.ts.map +1 -1
- package/dist/src/intl/zh-CN.js +20 -0
- package/dist/src/intl/zh-TW.d.ts +24 -1
- package/dist/src/intl/zh-TW.d.ts.map +1 -1
- package/dist/src/intl/zh-TW.js +20 -0
- package/dist/src/local-first/Db.d.ts +52 -3
- package/dist/src/local-first/Db.d.ts.map +1 -1
- package/dist/src/local-first/Db.js +412 -137
- package/dist/src/local-first/Evolu.d.ts +336 -211
- package/dist/src/local-first/Evolu.d.ts.map +1 -1
- package/dist/src/local-first/Evolu.js +102 -15
- package/dist/src/local-first/Owner.d.ts +13 -30
- package/dist/src/local-first/Owner.d.ts.map +1 -1
- package/dist/src/local-first/Owner.js +13 -30
- package/dist/src/local-first/Protocol.d.ts +95 -17
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +119 -39
- package/dist/src/local-first/Query.d.ts +8 -15
- package/dist/src/local-first/Query.d.ts.map +1 -1
- package/dist/src/local-first/Schema.d.ts +345 -21
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Schema.js +214 -17
- package/dist/src/local-first/Shared.d.ts +537 -22
- package/dist/src/local-first/Shared.d.ts.map +1 -1
- package/dist/src/local-first/Shared.js +1437 -234
- package/dist/src/local-first/Storage.d.ts +192 -14
- package/dist/src/local-first/Storage.d.ts.map +1 -1
- package/dist/src/local-first/Storage.js +82 -21
- package/dist/src/local-first/Timestamp.d.ts +392 -41
- package/dist/src/local-first/Timestamp.d.ts.map +1 -1
- package/dist/src/local-first/Timestamp.js +404 -82
- package/dist/src/local-first/index.d.ts +0 -1
- package/dist/src/local-first/index.d.ts.map +1 -1
- package/dist/src/local-first/index.js +0 -1
- package/package.json +1 -1
- package/src/Assert.test.ts +2 -5
- package/src/{Binary.test.ts → Bytes.test.ts} +286 -1
- package/src/{Binary.ts → Bytes.ts} +652 -21
- package/src/Config.test.ts +668 -0
- package/src/Config.ts +410 -0
- package/src/Console.ts +62 -7
- package/src/Crypto.ts +76 -4
- package/src/Eq.test.ts +2 -3
- package/src/Error.test.ts +76 -3
- package/src/Error.ts +71 -0
- package/src/Fs.test.ts +105 -0
- package/src/Fs.ts +488 -0
- package/src/Identicon.ts +2 -2
- package/src/LeakDetector.ts +22 -3
- package/src/LockManager.ts +8 -0
- package/src/Number.test.ts +82 -18
- package/src/Number.ts +76 -8
- package/src/Object.test.ts +139 -10
- package/src/Object.ts +49 -0
- package/src/Platform.ts +50 -8
- package/src/Random.ts +25 -2
- package/src/Resource.test.ts +837 -0
- package/src/Resource.ts +235 -15
- package/src/Schedule.test.ts +50 -12
- package/src/Schedule.ts +24 -14
- package/src/Sqlite.ts +138 -18
- package/src/Task.test.ts +189 -8
- package/src/Task.ts +56 -17
- package/src/Test.ts +9 -0
- package/src/Time.test.ts +82 -11
- package/src/Time.ts +246 -24
- package/src/Type.test.ts +3994 -1119
- package/src/Type.ts +7258 -3842
- package/src/Types.test.ts +4 -14
- package/src/WebSocket.ts +313 -40
- package/src/Worker.ts +90 -8
- package/src/index.ts +18 -7
- package/src/intl/_en.ts +70 -0
- package/src/intl/ar.ts +71 -0
- package/src/intl/bn.ts +70 -0
- package/src/intl/ca.ts +70 -0
- package/src/intl/cs.ts +70 -0
- package/src/intl/da.ts +70 -0
- package/src/intl/de.ts +70 -0
- package/src/intl/el.ts +70 -0
- package/src/intl/es.ts +70 -0
- package/src/intl/fa.ts +70 -0
- package/src/intl/fi.ts +70 -0
- package/src/intl/fil.ts +70 -0
- package/src/intl/fr.ts +70 -0
- package/src/intl/he.ts +70 -0
- package/src/intl/hi.ts +70 -0
- package/src/intl/hr.ts +70 -0
- package/src/intl/hu.ts +69 -0
- package/src/intl/id.ts +70 -0
- package/src/intl/intl.test.ts +819 -1
- package/src/intl/it.ts +70 -0
- package/src/intl/ja.ts +70 -0
- package/src/intl/ko.ts +68 -0
- package/src/intl/ml.ts +70 -0
- package/src/intl/mr.ts +70 -0
- package/src/intl/ms.ts +71 -0
- package/src/intl/nb.ts +69 -0
- package/src/intl/nl.ts +70 -0
- package/src/intl/pa.ts +70 -0
- package/src/intl/pl.ts +63 -0
- package/src/intl/pt-BR.ts +70 -0
- package/src/intl/pt.ts +71 -0
- package/src/intl/ro.ts +70 -0
- package/src/intl/sk.ts +71 -0
- package/src/intl/sl.ts +70 -0
- package/src/intl/sv.ts +70 -0
- package/src/intl/sw.ts +62 -0
- package/src/intl/ta.ts +70 -0
- package/src/intl/te.ts +70 -0
- package/src/intl/th.ts +68 -0
- package/src/intl/tr.ts +70 -0
- package/src/intl/uk.ts +228 -155
- package/src/intl/ur.ts +70 -0
- package/src/intl/vi.ts +70 -0
- package/src/intl/zh-CN.ts +68 -0
- package/src/intl/zh-TW.ts +68 -0
- package/src/local-first/Db.ts +644 -339
- package/src/local-first/Evolu.test.ts +686 -21
- package/src/local-first/Evolu.ts +450 -228
- package/src/local-first/Owner.ts +13 -30
- package/src/local-first/Protocol.test.ts +618 -11
- package/src/local-first/Protocol.ts +197 -73
- package/src/local-first/Query.ts +8 -15
- package/src/local-first/Schema.test.ts +143 -0
- package/src/local-first/Schema.ts +374 -24
- package/src/local-first/Shared.test.ts +7731 -559
- package/src/local-first/Shared.ts +2036 -267
- package/src/local-first/Storage.ts +219 -33
- package/src/local-first/Timestamp.test.ts +344 -70
- package/src/local-first/Timestamp.ts +435 -119
- package/src/local-first/index.ts +0 -1
- package/dist/src/Binary.d.ts +0 -254
- package/dist/src/Binary.d.ts.map +0 -1
- package/dist/src/local-first/Error.d.ts +0 -12
- package/dist/src/local-first/Error.d.ts.map +0 -1
- package/dist/src/local-first/Error.js +0 -6
- package/dist/src/local-first/LocalAuth.d.ts +0 -150
- package/dist/src/local-first/LocalAuth.d.ts.map +0 -1
- package/dist/src/local-first/LocalAuth.js +0 -179
- package/src/local-first/Error.ts +0 -17
- package/src/local-first/LocalAuth.ts +0 -457
|
@@ -7,13 +7,19 @@ import * as Kysely from "kysely";
|
|
|
7
7
|
import type { StandardSchemaV1 } from "@standard-schema/spec";
|
|
8
8
|
import { type ReadonlyRecord } from "../Object.ts";
|
|
9
9
|
import { SqliteBoolean, type SqliteDep, type SqliteQueryOptions, type SqliteSchema, SqliteValue } from "../Sqlite.ts";
|
|
10
|
+
import type { Millis } from "../Time.ts";
|
|
10
11
|
import { DateIso, type Id, IdBytes, type InferType, Null, type ObjectType, type UnionType } from "../Type.ts";
|
|
11
12
|
import type { CompileTimeError, Simplify } from "../Types.ts";
|
|
13
|
+
import type { OwnerIdBytes } from "./Owner.ts";
|
|
12
14
|
import { OwnerId } from "./Owner.ts";
|
|
13
15
|
import type { Query, Row } from "./Query.ts";
|
|
14
16
|
import type { DbChange } from "./Storage.ts";
|
|
15
17
|
import { TimestampBytes } from "./Timestamp.ts";
|
|
16
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Any Standard Schema V1 declaration.
|
|
20
|
+
*
|
|
21
|
+
* @group Core
|
|
22
|
+
*/
|
|
17
23
|
export type AnyStandardSchemaV1 = StandardSchemaV1<any, any>;
|
|
18
24
|
/**
|
|
19
25
|
* Defines the schema of an Evolu database.
|
|
@@ -29,6 +35,16 @@ export type AnyStandardSchemaV1 = StandardSchemaV1<any, any>;
|
|
|
29
35
|
* Table schema defines columns that are required for table rows. For optional
|
|
30
36
|
* columns, use a schema whose output type includes `null`.
|
|
31
37
|
*
|
|
38
|
+
* Prefer applying defaults when reading or displaying data. A nullable column
|
|
39
|
+
* can preserve the distinction between "not specified" and an explicitly chosen
|
|
40
|
+
* value. For example, `null` can mean no notification preference, while an
|
|
41
|
+
* explicit false value means notifications were disabled.
|
|
42
|
+
*
|
|
43
|
+
* Use {@link withDefault} only when replacing absence is intentional. Storing
|
|
44
|
+
* defaulted values can add unnecessary data to database rows and erase that
|
|
45
|
+
* distinction. Store a value when it represents a user's decision or another
|
|
46
|
+
* fact your application needs to retain.
|
|
47
|
+
*
|
|
32
48
|
* ### Example
|
|
33
49
|
*
|
|
34
50
|
* ```ts
|
|
@@ -74,10 +90,117 @@ export type AnyStandardSchemaV1 = StandardSchemaV1<any, any>;
|
|
|
74
90
|
* };
|
|
75
91
|
* assertTrue(ZodSchema.todo.title.safeParse("Write docs").success);
|
|
76
92
|
* ```
|
|
93
|
+
*
|
|
94
|
+
* @group Core
|
|
77
95
|
*/
|
|
78
96
|
export type EvoluSchema = ReadonlyRecord<string, TableSchema>;
|
|
79
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* A table schema: column names mapped to Standard Schema validators.
|
|
99
|
+
*
|
|
100
|
+
* @group Core
|
|
101
|
+
*/
|
|
80
102
|
export type TableSchema = ReadonlyRecord<string, AnyStandardSchemaV1>;
|
|
103
|
+
/**
|
|
104
|
+
* Whether a table is local-only: its name starts with an underscore, so its
|
|
105
|
+
* changes are stored without synchronization.
|
|
106
|
+
*
|
|
107
|
+
* @group Core
|
|
108
|
+
*/
|
|
109
|
+
export declare const isLocalOnlyTable: (table: string) => boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Todo ID Type for {@link testEvoluSchema}.
|
|
112
|
+
*
|
|
113
|
+
* @group Testing
|
|
114
|
+
*/
|
|
115
|
+
export declare const TestTodoId: import("../Type.ts").TableId<"Todo">;
|
|
116
|
+
export type TestTodoId = typeof TestTodoId.Output;
|
|
117
|
+
/**
|
|
118
|
+
* Deterministic {@link TestTodoId} for tests and examples.
|
|
119
|
+
*
|
|
120
|
+
* @group Testing
|
|
121
|
+
*/
|
|
122
|
+
export declare const testTodoId: string & import("../Brand.ts").Brand<"Id"> & import("../Brand.ts").Brand<"Todo">;
|
|
123
|
+
/**
|
|
124
|
+
* Project ID Type for {@link testEvoluSchema}.
|
|
125
|
+
*
|
|
126
|
+
* @group Testing
|
|
127
|
+
*/
|
|
128
|
+
export declare const TestProjectId: import("../Type.ts").TableId<"Project">;
|
|
129
|
+
export type TestProjectId = typeof TestProjectId.Output;
|
|
130
|
+
/**
|
|
131
|
+
* Deterministic {@link TestProjectId} for tests and examples.
|
|
132
|
+
*
|
|
133
|
+
* @group Testing
|
|
134
|
+
*/
|
|
135
|
+
export declare const testProjectId: string & import("../Brand.ts").Brand<"Id"> & import("../Brand.ts").Brand<"Project">;
|
|
136
|
+
/**
|
|
137
|
+
* Todo and project schema for tests and examples. A todo can belong to a
|
|
138
|
+
* project or have no project. Use an explicit schema when teaching schema
|
|
139
|
+
* definition.
|
|
140
|
+
*
|
|
141
|
+
* ### Example
|
|
142
|
+
*
|
|
143
|
+
* ```ts
|
|
144
|
+
* import {
|
|
145
|
+
* assertOk,
|
|
146
|
+
* testEvoluSchema,
|
|
147
|
+
* testProjectId,
|
|
148
|
+
* testTodoId,
|
|
149
|
+
* } from "@evolu/common";
|
|
150
|
+
*
|
|
151
|
+
* assertOk(testEvoluSchema.todo.id.from(testTodoId), testTodoId);
|
|
152
|
+
* assertOk(
|
|
153
|
+
* testEvoluSchema.todo.projectId.from(testProjectId),
|
|
154
|
+
* testProjectId,
|
|
155
|
+
* );
|
|
156
|
+
* ```
|
|
157
|
+
*
|
|
158
|
+
* @group Testing
|
|
159
|
+
*/
|
|
160
|
+
export declare const testEvoluSchema: {
|
|
161
|
+
readonly todo: {
|
|
162
|
+
readonly id: import("../Type.ts").TableId<"Todo">;
|
|
163
|
+
readonly title: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"String", string, string, import("../Type.ts").TypeOfError<"String">, null, import("../Type.ts").TypeOfError<"String">, never, string, true>, "Trimmed", import("../Type.ts").TrimmedError>, "MinLength1", import("../Type.ts").MinLengthError<1>>, "MaxLength100", import("../Type.ts").MaxLengthError<100>>;
|
|
164
|
+
readonly isCompleted: UnionType<readonly [UnionType<readonly [import("../Type.ts").LiteralType<0>, import("../Type.ts").LiteralType<1>]>, import("../Type.ts").LiteralType<null>]>;
|
|
165
|
+
readonly projectId: UnionType<readonly [import("../Type.ts").TableId<"Project">, import("../Type.ts").LiteralType<null>]>;
|
|
166
|
+
};
|
|
167
|
+
readonly project: {
|
|
168
|
+
readonly id: import("../Type.ts").TableId<"Project">;
|
|
169
|
+
readonly name: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"String", string, string, import("../Type.ts").TypeOfError<"String">, null, import("../Type.ts").TypeOfError<"String">, never, string, true>, "Trimmed", import("../Type.ts").TrimmedError>, "MinLength1", import("../Type.ts").MinLengthError<1>>, "MaxLength100", import("../Type.ts").MaxLengthError<100>>;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Schema type of {@link testEvoluSchema}.
|
|
174
|
+
*
|
|
175
|
+
* @group Testing
|
|
176
|
+
*/
|
|
177
|
+
export type TestEvoluSchema = typeof testEvoluSchema;
|
|
178
|
+
/**
|
|
179
|
+
* App-owner registry schema with local tables for tests and examples.
|
|
180
|
+
*
|
|
181
|
+
* Stores operational keys separately from optional recovery material. A null
|
|
182
|
+
* secret represents an owner whose recovery material is managed elsewhere or
|
|
183
|
+
* unavailable. Names are optional device-local labels; identicons can be
|
|
184
|
+
* derived from the owner identity without an additional column.
|
|
185
|
+
*
|
|
186
|
+
* This fixture does not define the production registry's persistence contract.
|
|
187
|
+
*
|
|
188
|
+
* @group Testing
|
|
189
|
+
*/
|
|
190
|
+
export declare const testLocalOnlyEvoluSchema: {
|
|
191
|
+
readonly _appOwner: {
|
|
192
|
+
readonly id: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"String", string, string, import("../Type.ts").TypeOfError<"String">, null, import("../Type.ts").TypeOfError<"String">, never, string, true>, "Id", import("../Type.ts").IdError>, "OwnerId", never>;
|
|
193
|
+
readonly encryptionKey: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, import("../Type.ts").ObjectTagError<"Uint8Array">, null, import("../Type.ts").ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "Entropy", never>, "Length32", import("../Type.ts").LengthError<32>>, "EncryptionKey", never>, "OwnerEncryptionKey", never>;
|
|
194
|
+
readonly writeKey: import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, import("../Type.ts").ObjectTagError<"Uint8Array">, null, import("../Type.ts").ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "Entropy", never>, "Length16", import("../Type.ts").LengthError<16>>, "OwnerWriteKey", never>;
|
|
195
|
+
readonly secret: UnionType<readonly [import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, import("../Type.ts").ObjectTagError<"Uint8Array">, null, import("../Type.ts").ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>, "Entropy", never>, "Length32", import("../Type.ts").LengthError<32>>, "OwnerSecret", never>, import("../Type.ts").LiteralType<null>]>;
|
|
196
|
+
readonly name: UnionType<readonly [import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").BrandType<import("../Type.ts").Type<"String", string, string, import("../Type.ts").TypeOfError<"String">, null, import("../Type.ts").TypeOfError<"String">, never, string, true>, "Trimmed", import("../Type.ts").TrimmedError>, "MinLength1", import("../Type.ts").MinLengthError<1>>, "MaxLength100", import("../Type.ts").MaxLengthError<100>>, import("../Type.ts").LiteralType<null>]>;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Dependency wrapper for {@link SqliteSchema}.
|
|
201
|
+
*
|
|
202
|
+
* @group SQLite
|
|
203
|
+
*/
|
|
81
204
|
export interface SqliteSchemaDep {
|
|
82
205
|
readonly sqliteSchema: SqliteSchema;
|
|
83
206
|
}
|
|
@@ -93,15 +216,108 @@ export interface SqliteSchemaDep {
|
|
|
93
216
|
* 2. The 'id' column output type must extend {@link Id}
|
|
94
217
|
* 3. Tables cannot use system column names (createdAt, updatedAt, isDeleted)
|
|
95
218
|
* 4. All column output types must be compatible with SQLite (extend SqliteValue)
|
|
219
|
+
*
|
|
220
|
+
* @group Validation
|
|
96
221
|
*/
|
|
97
222
|
export type ValidateSchema<S extends EvoluSchema> = ValidateSchemaHasId<S> extends never ? ValidateIdColumnType<S> extends never ? ValidateNoSystemColumns<S> extends never ? ValidateColumnTypes<S> extends never ? S : ValidateColumnTypes<S> : ValidateNoSystemColumns<S> : ValidateIdColumnType<S> : ValidateSchemaHasId<S>;
|
|
223
|
+
/**
|
|
224
|
+
* Defines SQLite indexes with Kysely's index builder.
|
|
225
|
+
*
|
|
226
|
+
* @group SQLite
|
|
227
|
+
*/
|
|
98
228
|
export type IndexesConfig = (create: (indexName: string) => Kysely.CreateIndexBuilder) => ReadonlyArray<Kysely.CreateIndexBuilder<any>>;
|
|
229
|
+
/**
|
|
230
|
+
* Why a message is stored in `evolu_message_quarantine` instead of being
|
|
231
|
+
* applied to its table. Persisted codes: names may change, but numbers must not
|
|
232
|
+
* be reassigned.
|
|
233
|
+
*
|
|
234
|
+
* Quarantine is queryable state, not an error. An application subscribes to a
|
|
235
|
+
* query over `evolu_message_quarantine` to tell the user what is waiting. Each
|
|
236
|
+
* row is one column of a message, so distinct `ownerId` and `timestamp` pairs
|
|
237
|
+
* count messages. `origin` records whether this database stamped the message
|
|
238
|
+
* for a local mutation or received it from sync, see {@link QuarantineOrigin}.
|
|
239
|
+
* `quarantinedAt` is the system time captured for the request that quarantined
|
|
240
|
+
* the row, in milliseconds; it is null for rows written before Evolu recorded
|
|
241
|
+
* it. The clock-drift rules are described in the Timestamp module.
|
|
242
|
+
*
|
|
243
|
+
* ### Example
|
|
244
|
+
*
|
|
245
|
+
* ```ts
|
|
246
|
+
* import {
|
|
247
|
+
* assertType,
|
|
248
|
+
* createQueryBuilder,
|
|
249
|
+
* type Millis,
|
|
250
|
+
* type OwnerIdBytes,
|
|
251
|
+
* type QuarantineOrigin,
|
|
252
|
+
* QuarantineReason,
|
|
253
|
+
* testEvoluSchema,
|
|
254
|
+
* type TimestampBytes,
|
|
255
|
+
* } from "@evolu/common";
|
|
256
|
+
*
|
|
257
|
+
* const createQuery = createQueryBuilder(testEvoluSchema);
|
|
258
|
+
*
|
|
259
|
+
* // Messages waiting in drift quarantine, one row per message.
|
|
260
|
+
* const driftQuarantineQuery = createQuery((db) =>
|
|
261
|
+
* db
|
|
262
|
+
* .selectFrom("evolu_message_quarantine")
|
|
263
|
+
* .select(["ownerId", "timestamp", "origin", "quarantinedAt"])
|
|
264
|
+
* .where("reason", "=", QuarantineReason.TimestampDrift)
|
|
265
|
+
* .distinct(),
|
|
266
|
+
* );
|
|
267
|
+
*
|
|
268
|
+
* assertType<
|
|
269
|
+
* typeof driftQuarantineQuery.Row,
|
|
270
|
+
* {
|
|
271
|
+
* ownerId: OwnerIdBytes;
|
|
272
|
+
* timestamp: TimestampBytes;
|
|
273
|
+
* origin: QuarantineOrigin;
|
|
274
|
+
* quarantinedAt: Millis | null;
|
|
275
|
+
* }
|
|
276
|
+
* >();
|
|
277
|
+
* ```
|
|
278
|
+
*
|
|
279
|
+
* @group Queries
|
|
280
|
+
*/
|
|
281
|
+
export declare const QuarantineReason: {
|
|
282
|
+
/**
|
|
283
|
+
* The message has a table or column the current schema does not define. It is
|
|
284
|
+
* applied automatically once a schema update defines them. A received change
|
|
285
|
+
* to a {@link isLocalOnlyTable | local-only} table is also stored here and is
|
|
286
|
+
* never applied.
|
|
287
|
+
*/
|
|
288
|
+
readonly Schema: 0;
|
|
289
|
+
/**
|
|
290
|
+
* The message's timestamp exceeded the drift limit when it was stored. It is
|
|
291
|
+
* applied when the database worker starts, once system time comes within the
|
|
292
|
+
* limit of the timestamp.
|
|
293
|
+
*/
|
|
294
|
+
readonly TimestampDrift: 1;
|
|
295
|
+
};
|
|
296
|
+
export type QuarantineReason = (typeof QuarantineReason)[keyof typeof QuarantineReason];
|
|
297
|
+
/**
|
|
298
|
+
* Whether a quarantined message was stamped by this database for a local
|
|
299
|
+
* mutation or received from sync. Persisted codes: names may change, but
|
|
300
|
+
* numbers must not be reassigned.
|
|
301
|
+
*
|
|
302
|
+
* @group Queries
|
|
303
|
+
*/
|
|
304
|
+
export declare const QuarantineOrigin: {
|
|
305
|
+
readonly LocalMutation: 0;
|
|
306
|
+
readonly ReceivedMessage: 1;
|
|
307
|
+
};
|
|
308
|
+
export type QuarantineOrigin = (typeof QuarantineOrigin)[keyof typeof QuarantineOrigin];
|
|
309
|
+
/**
|
|
310
|
+
* Typed query factory returned by {@link createQueryBuilder}.
|
|
311
|
+
*
|
|
312
|
+
* @group Queries
|
|
313
|
+
*/
|
|
99
314
|
export type CreateQuery<S extends EvoluSchema> = <R extends Row>(queryCallback: (db: Pick<Kysely.Kysely<{
|
|
100
315
|
[Table in keyof S]: {
|
|
101
316
|
readonly [Column in keyof S[Table]]: Column extends "id" ? StandardSchemaV1.InferOutput<S[Table][Column]> : StandardSchemaV1.InferOutput<S[Table][Column]> | null;
|
|
102
317
|
} & SystemColumns;
|
|
103
318
|
} & {
|
|
104
319
|
readonly evolu_history: {
|
|
320
|
+
readonly ownerId: OwnerIdBytes;
|
|
105
321
|
readonly timestamp: TimestampBytes;
|
|
106
322
|
readonly table: keyof S;
|
|
107
323
|
readonly id: IdBytes;
|
|
@@ -109,11 +325,15 @@ export type CreateQuery<S extends EvoluSchema> = <R extends Row>(queryCallback:
|
|
|
109
325
|
readonly value: SqliteValue;
|
|
110
326
|
};
|
|
111
327
|
readonly evolu_message_quarantine: {
|
|
328
|
+
readonly ownerId: OwnerIdBytes;
|
|
112
329
|
readonly timestamp: TimestampBytes;
|
|
113
330
|
readonly table: string;
|
|
114
331
|
readonly id: IdBytes;
|
|
115
332
|
readonly column: string;
|
|
116
333
|
readonly value: SqliteValue;
|
|
334
|
+
readonly reason: QuarantineReason;
|
|
335
|
+
readonly origin: QuarantineOrigin;
|
|
336
|
+
readonly quarantinedAt: Millis | null;
|
|
117
337
|
};
|
|
118
338
|
}>, "selectFrom" | "fn" | "with" | "withRecursive">) => Kysely.SelectQueryBuilder<any, any, R>, options?: SqliteQueryOptions) => Query<S, Kysely.Simplify<R>>;
|
|
119
339
|
/**
|
|
@@ -124,6 +344,8 @@ export type CreateQuery<S extends EvoluSchema> = <R extends Row>(queryCallback:
|
|
|
124
344
|
* - `isDeleted`: Soft delete flag created by Evolu and used by the developer to
|
|
125
345
|
* mark rows as deleted.
|
|
126
346
|
* - `ownerId`: Represents ownership and logically partitions the database.
|
|
347
|
+
*
|
|
348
|
+
* @group Core
|
|
127
349
|
*/
|
|
128
350
|
export declare const SystemColumns: ObjectType<{
|
|
129
351
|
readonly createdAt: typeof DateIso;
|
|
@@ -133,6 +355,11 @@ export declare const SystemColumns: ObjectType<{
|
|
|
133
355
|
}>;
|
|
134
356
|
export interface SystemColumns extends InferType<typeof SystemColumns> {
|
|
135
357
|
}
|
|
358
|
+
/**
|
|
359
|
+
* Kind of a {@link Mutation}: insert, update, or upsert.
|
|
360
|
+
*
|
|
361
|
+
* @group Mutations
|
|
362
|
+
*/
|
|
136
363
|
export type MutationKind = "insert" | "update" | "upsert";
|
|
137
364
|
/**
|
|
138
365
|
* Mutation function type. Accepts already-validated values — validation is the
|
|
@@ -153,15 +380,32 @@ export type MutationKind = "insert" | "update" | "upsert";
|
|
|
153
380
|
* `id` omitted (auto-generated)
|
|
154
381
|
* - **update**: only `id` required, everything else optional
|
|
155
382
|
* - **upsert**: like insert but `id` required too
|
|
383
|
+
*
|
|
384
|
+
* @group Mutations
|
|
156
385
|
*/
|
|
157
386
|
export type Mutation<S extends EvoluSchema, Kind extends MutationKind> = <TableName extends keyof S>(table: TableName, values: MutationValues<S[TableName], Kind>, options?: MutationOptions) => {
|
|
158
387
|
readonly id: StandardSchemaV1.InferOutput<S[TableName]["id"]>;
|
|
159
388
|
};
|
|
389
|
+
/**
|
|
390
|
+
* Options accepted by every {@link Mutation}.
|
|
391
|
+
*
|
|
392
|
+
* @group Mutations
|
|
393
|
+
*/
|
|
160
394
|
export interface MutationOptions {
|
|
161
395
|
/**
|
|
162
|
-
* Called after the mutation
|
|
163
|
-
* Useful for
|
|
164
|
-
* insert, update, or upsert.
|
|
396
|
+
* Called after the mutation's changes are stored and subscribed queries
|
|
397
|
+
* reflect them. Useful for follow-up work (e.g., notifications, navigation)
|
|
398
|
+
* after insert, update, or upsert. It never runs when the database is
|
|
399
|
+
* unavailable.
|
|
400
|
+
*
|
|
401
|
+
* Stored does not always mean visible. A change quarantined for
|
|
402
|
+
* {@link QuarantineReason.TimestampDrift} is stored in
|
|
403
|
+
* `evolu_message_quarantine` without changing application rows. `onComplete`
|
|
404
|
+
* still fires after storage commits; no drift error is reported. Applications
|
|
405
|
+
* can subscribe to the quarantine table; those query results reflect the
|
|
406
|
+
* change before `onComplete` runs. See the
|
|
407
|
+
* {@link @evolu/common!"local-first/Timestamp" | Timestamp module} for drift
|
|
408
|
+
* and release behavior.
|
|
165
409
|
*/
|
|
166
410
|
readonly onComplete?: () => void;
|
|
167
411
|
/**
|
|
@@ -224,22 +468,34 @@ export interface MutationOptions {
|
|
|
224
468
|
*/
|
|
225
469
|
readonly ownerId?: OwnerId;
|
|
226
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Database change produced by a {@link Mutation}, attributed to the
|
|
473
|
+
* {@link OwnerId} that owns the row.
|
|
474
|
+
*
|
|
475
|
+
* @group Mutations
|
|
476
|
+
*/
|
|
227
477
|
export interface MutationChange extends DbChange {
|
|
228
478
|
readonly ownerId: OwnerId;
|
|
229
479
|
}
|
|
230
480
|
/**
|
|
231
481
|
* Derives the expected values type for a mutation from a table's column schemas
|
|
232
482
|
* and a {@link MutationKind}.
|
|
483
|
+
*
|
|
484
|
+
* @group Mutations
|
|
233
485
|
*/
|
|
234
486
|
export type MutationValues<T extends TableSchema, M extends MutationKind> = Simplify<M extends "insert" ? InsertValues<T> : M extends "update" ? UpdateValues<T> : UpsertValues<T>>;
|
|
235
487
|
/**
|
|
236
488
|
* Insert values: `id` omitted (auto-generated), nullable columns optional,
|
|
237
489
|
* non-nullable columns required.
|
|
490
|
+
*
|
|
491
|
+
* @group Mutations
|
|
238
492
|
*/
|
|
239
493
|
export type InsertValues<T extends TableSchema> = Omit<NullableColumnsToOptional<T>, "id">;
|
|
240
494
|
/**
|
|
241
495
|
* Update values: `id` required, all other columns optional. Includes
|
|
242
496
|
* `isDeleted` for soft deletes.
|
|
497
|
+
*
|
|
498
|
+
* @group Mutations
|
|
243
499
|
*/
|
|
244
500
|
export type UpdateValues<T extends TableSchema> = {
|
|
245
501
|
readonly id: StandardSchemaV1.InferOutput<T["id"]>;
|
|
@@ -251,30 +507,85 @@ export type UpdateValues<T extends TableSchema> = {
|
|
|
251
507
|
/**
|
|
252
508
|
* Upsert values: `id` required, nullable columns optional, non-nullable columns
|
|
253
509
|
* required. Includes `isDeleted` for soft deletes.
|
|
510
|
+
*
|
|
511
|
+
* @group Mutations
|
|
254
512
|
*/
|
|
255
513
|
export type UpsertValues<T extends TableSchema> = NullableColumnsToOptional<T> & {
|
|
256
514
|
readonly isDeleted?: SqliteBoolean;
|
|
257
515
|
};
|
|
516
|
+
/**
|
|
517
|
+
* Requires an `id` column in every table.
|
|
518
|
+
*
|
|
519
|
+
* @group Validation
|
|
520
|
+
*/
|
|
258
521
|
export type ValidateSchemaHasId<S extends EvoluSchema> = keyof S extends infer TableName ? TableName extends keyof S ? "id" extends keyof S[TableName] ? never : SchemaValidationError<`Table "${TableName & string}" is missing required id column.`> : never : never;
|
|
522
|
+
/**
|
|
523
|
+
* Requires every `id` column output type to extend {@link Id}.
|
|
524
|
+
*
|
|
525
|
+
* @group Validation
|
|
526
|
+
*/
|
|
259
527
|
export type ValidateIdColumnType<S extends EvoluSchema> = keyof S extends infer TableName ? TableName extends keyof S ? "id" extends keyof S[TableName] ? StandardSchemaV1.InferOutput<S[TableName]["id"]> extends Id ? never : SchemaValidationError<`Table "${TableName & string}" id column output type must extend Id. Use id("${TableName & string}") from Evolu Type.`> : never : never : never;
|
|
528
|
+
/**
|
|
529
|
+
* Rejects tables that define system column names.
|
|
530
|
+
*
|
|
531
|
+
* @group Validation
|
|
532
|
+
*/
|
|
260
533
|
export type ValidateNoSystemColumns<S extends EvoluSchema> = keyof S extends infer TableName ? TableName extends keyof S ? keyof S[TableName] extends infer ColumnName ? ColumnName extends keyof S[TableName] ? ColumnName extends "createdAt" | "updatedAt" | "isDeleted" | "ownerId" ? SchemaValidationError<`Table "${TableName & string}" uses system column name "${ColumnName & string}". System columns (createdAt, updatedAt, isDeleted, ownerId) are added automatically.`> : never : never : never : never : never;
|
|
534
|
+
/**
|
|
535
|
+
* Requires every column output type to be compatible with SQLite.
|
|
536
|
+
*
|
|
537
|
+
* @group Validation
|
|
538
|
+
*/
|
|
261
539
|
export type ValidateColumnTypes<S extends EvoluSchema> = keyof S extends infer TableName ? TableName extends keyof S ? keyof S[TableName] extends infer ColumnName ? ColumnName extends keyof S[TableName] ? StandardSchemaV1.InferOutput<S[TableName][ColumnName]> extends SqliteValue | SqliteBoolean ? never : SchemaValidationError<`Table "${TableName & string}" column "${ColumnName & string}" type is not compatible with SQLite. Column types must extend SqliteValue (string, FiniteNumber, Uint8Array, or null).`> : never : never : never : never;
|
|
262
|
-
/**
|
|
540
|
+
/**
|
|
541
|
+
* Schema validation error that shows clear, readable messages
|
|
542
|
+
*
|
|
543
|
+
* @group Validation
|
|
544
|
+
*/
|
|
263
545
|
export type SchemaValidationError<Message extends string> = CompileTimeError<"Schema", Message>;
|
|
264
|
-
/**
|
|
546
|
+
/**
|
|
547
|
+
* Makes columns whose output type includes `null` optional.
|
|
548
|
+
*
|
|
549
|
+
* @group Mutations
|
|
550
|
+
*/
|
|
265
551
|
export type NullableColumnsToOptional<T extends TableSchema> = {
|
|
266
552
|
readonly [K in RequiredColumnKeys<T>]: StandardSchemaV1.InferOutput<T[K]>;
|
|
267
553
|
} & {
|
|
268
554
|
readonly [K in OptionalColumnKeys<T>]?: StandardSchemaV1.InferOutput<T[K]>;
|
|
269
555
|
};
|
|
556
|
+
/**
|
|
557
|
+
* Column names whose output type excludes `null`.
|
|
558
|
+
*
|
|
559
|
+
* @group Mutations
|
|
560
|
+
*/
|
|
270
561
|
export type RequiredColumnKeys<T extends TableSchema> = {
|
|
271
562
|
[K in keyof T]: null extends StandardSchemaV1.InferOutput<T[K]> ? never : K;
|
|
272
563
|
}[keyof T];
|
|
564
|
+
/**
|
|
565
|
+
* Column names whose output type includes `null`.
|
|
566
|
+
*
|
|
567
|
+
* @group Mutations
|
|
568
|
+
*/
|
|
273
569
|
export type OptionalColumnKeys<T extends TableSchema> = {
|
|
274
570
|
[K in keyof T]: null extends StandardSchemaV1.InferOutput<T[K]> ? K : never;
|
|
275
571
|
}[keyof T];
|
|
572
|
+
/**
|
|
573
|
+
* Names of {@link SystemColumns}.
|
|
574
|
+
*
|
|
575
|
+
* @group Core
|
|
576
|
+
*/
|
|
276
577
|
export declare const systemColumns: ReadonlySet<string>;
|
|
578
|
+
/**
|
|
579
|
+
* Names of {@link SystemColumns} together with `id`.
|
|
580
|
+
*
|
|
581
|
+
* @group Core
|
|
582
|
+
*/
|
|
277
583
|
export declare const systemColumnsWithId: ReadonlyArray<string>;
|
|
584
|
+
/**
|
|
585
|
+
* Derives {@link SqliteSchema} tables and indexes from an {@link EvoluSchema}.
|
|
586
|
+
*
|
|
587
|
+
* @group SQLite
|
|
588
|
+
*/
|
|
278
589
|
export declare const evoluSchemaToSqliteSchema: <S extends EvoluSchema>(schema: ValidateSchema<S> extends never ? S : ValidateSchema<S>, indexesConfig?: IndexesConfig) => SqliteSchema;
|
|
279
590
|
/**
|
|
280
591
|
* Creates a query builder from a {@link EvoluSchema}.
|
|
@@ -291,24 +602,14 @@ export declare const evoluSchemaToSqliteSchema: <S extends EvoluSchema>(schema:
|
|
|
291
602
|
* import {
|
|
292
603
|
* assertType,
|
|
293
604
|
* createQueryBuilder,
|
|
294
|
-
*
|
|
605
|
+
* testEvoluSchema,
|
|
606
|
+
* type TestTodoId,
|
|
295
607
|
* NonEmptyTrimmedString100,
|
|
296
|
-
* nullOr,
|
|
297
608
|
* SqliteBoolean,
|
|
298
609
|
* } from "@evolu/common";
|
|
299
610
|
*
|
|
300
|
-
* const TodoId = id("Todo");
|
|
301
|
-
* type TodoId = typeof TodoId.Output;
|
|
302
|
-
* const Schema = {
|
|
303
|
-
* todo: {
|
|
304
|
-
* id: TodoId,
|
|
305
|
-
* title: NonEmptyTrimmedString100,
|
|
306
|
-
* isCompleted: nullOr(SqliteBoolean),
|
|
307
|
-
* },
|
|
308
|
-
* };
|
|
309
|
-
*
|
|
310
611
|
* // Create one typed builder per schema and reuse it for every query.
|
|
311
|
-
* const createQuery = createQueryBuilder(
|
|
612
|
+
* const createQuery = createQueryBuilder(testEvoluSchema);
|
|
312
613
|
* const todosQuery = createQuery((db) =>
|
|
313
614
|
* db.selectFrom("todo").select(["id", "title", "isCompleted"]),
|
|
314
615
|
* );
|
|
@@ -316,15 +617,38 @@ export declare const evoluSchemaToSqliteSchema: <S extends EvoluSchema>(schema:
|
|
|
316
617
|
* assertType<
|
|
317
618
|
* typeof todosQuery.Row,
|
|
318
619
|
* {
|
|
319
|
-
* id:
|
|
620
|
+
* id: TestTodoId;
|
|
320
621
|
* title: NonEmptyTrimmedString100 | null;
|
|
321
622
|
* isCompleted: SqliteBoolean | null;
|
|
322
623
|
* }
|
|
323
624
|
* >();
|
|
324
625
|
* ```
|
|
626
|
+
*
|
|
627
|
+
* @group Queries
|
|
325
628
|
*/
|
|
326
629
|
export declare const createQueryBuilder: <S extends EvoluSchema>(_schema: S) => CreateQuery<S>;
|
|
630
|
+
/**
|
|
631
|
+
* Creates missing tables, columns, and indexes, and drops indexes that the new
|
|
632
|
+
* schema no longer defines.
|
|
633
|
+
*
|
|
634
|
+
* @group SQLite
|
|
635
|
+
*/
|
|
327
636
|
export declare const ensureSqliteSchema: (deps: SqliteDep) => (newSchema: SqliteSchema, currentSchema?: SqliteSchema) => void;
|
|
637
|
+
/**
|
|
638
|
+
* Reads the current application {@link SqliteSchema}, excluding Evolu's internal
|
|
639
|
+
* indexes.
|
|
640
|
+
*
|
|
641
|
+
* @group SQLite
|
|
642
|
+
*/
|
|
328
643
|
export declare const getEvoluSqliteSchema: (deps: SqliteDep) => () => SqliteSchema;
|
|
644
|
+
/**
|
|
645
|
+
* Kysely instance that only compiles queries to SQL. It never executes them;
|
|
646
|
+
* Evolu runs the compiled SQL itself.
|
|
647
|
+
*
|
|
648
|
+
* See [Splitting query building and
|
|
649
|
+
* execution](https://kysely.dev/docs/recipes/splitting-query-building-and-execution).
|
|
650
|
+
*
|
|
651
|
+
* @group Queries
|
|
652
|
+
*/
|
|
329
653
|
export declare const kysely: Kysely.Kysely<unknown>;
|
|
330
654
|
//# sourceMappingURL=Schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../src/local-first/Schema.ts"],"names":[],"mappings":"AAAA;;;;GA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