@delali/sirannon-db 0.3.4-next.62 → 0.3.4
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 +79 -56
- package/dist/backup/index.d.ts +44 -45
- package/dist/backup/index.mjs +7 -7
- package/dist/backup-scheduler/index.d.ts +42 -41
- package/dist/backup-scheduler/index.mjs +4 -4
- package/dist/baseline-Co3iIsN_.d.ts +19 -0
- package/dist/change-tracker-DqCdeEyx.d.ts +128 -0
- package/dist/{chunk-VOSJBZ6Q.mjs → chunk-2ES3DT4A.mjs} +71 -33
- package/dist/{chunk-6CMCO7S4.mjs → chunk-2O3PP4CF.mjs} +1 -1
- package/dist/{chunk-E7Q7HE46.mjs → chunk-3BZLZ47R.mjs} +26 -26
- package/dist/chunk-4KASJKKK.mjs +2501 -0
- package/dist/{chunk-MYNI2WFS.mjs → chunk-52XW3Z76.mjs} +40 -8
- package/dist/chunk-55YRLSM2.mjs +57 -0
- package/dist/{chunk-KDAHYFW7.mjs → chunk-6AOJCNRU.mjs} +5 -5
- package/dist/{chunk-KXTYR2OQ.mjs → chunk-A3PHCO6W.mjs} +39 -111
- package/dist/chunk-ADNWEHGZ.mjs +299 -0
- package/dist/{chunk-2QLXDHAP.mjs → chunk-BLMRNSUG.mjs} +11 -2
- package/dist/chunk-BVMZJOVM.mjs +5 -0
- package/dist/{chunk-IWGIYDMZ.mjs → chunk-BZWDPF4G.mjs} +1 -1
- package/dist/{chunk-YVF2ZJTE.mjs → chunk-CZL4D3BM.mjs} +1 -1
- package/dist/{chunk-7SC2TZAS.mjs → chunk-DX4WGJL7.mjs} +2 -2
- package/dist/{chunk-45MKELYA.mjs → chunk-ESTZZPT5.mjs} +132 -13
- package/dist/{chunk-QP5L5DFJ.mjs → chunk-FJPR2CJX.mjs} +3 -3
- package/dist/chunk-HR7K3GZW.mjs +36 -0
- package/dist/{chunk-LXCGPZPA.mjs → chunk-IEKIYO4V.mjs} +1 -1
- package/dist/{chunk-TUD5CJ76.mjs → chunk-KB4OLJAD.mjs} +26 -19
- package/dist/{chunk-PBRXXISQ.mjs → chunk-KINDFBQP.mjs} +3 -2
- package/dist/{chunk-E6IMX7RS.mjs → chunk-KJLNYOOL.mjs} +2 -2
- package/dist/{chunk-BTTFW4Z4.mjs → chunk-KU32OT4H.mjs} +2 -10
- package/dist/{chunk-JQWGHSEH.mjs → chunk-NVSQ2T5Q.mjs} +71 -70
- package/dist/{chunk-W4EUTJNT.mjs → chunk-NZGSDALX.mjs} +94 -96
- package/dist/{chunk-U445A3C4.mjs → chunk-QGVRRKB2.mjs} +1 -1
- package/dist/{chunk-GYCEJNU4.mjs → chunk-R7GBXNTO.mjs} +1 -1
- package/dist/{chunk-7C36BCSN.mjs → chunk-VDN6FHU4.mjs} +1 -1
- package/dist/{chunk-6IYS4WLH.mjs → chunk-VO3ZWA2G.mjs} +142 -115
- package/dist/chunk-WOMADPM4.mjs +12 -0
- package/dist/{chunk-OUSWVNWT.mjs → chunk-YCMB6GR4.mjs} +1 -1
- package/dist/{chunk-YNTDOFTN.mjs → chunk-YW7IKQ7T.mjs} +1 -1
- package/dist/{chunk-M2BEAH5I.mjs → chunk-ZN4HI5FK.mjs} +126 -72
- package/dist/{chunk-SBL6GN43.mjs → chunk-ZYWI45EN.mjs} +1 -1
- package/dist/client/index.d.ts +135 -137
- package/dist/client/index.mjs +177 -82
- package/dist/client/topology.d.ts +31 -31
- package/dist/client/topology.mjs +42 -23
- package/dist/client-base-BxTocU1x.d.ts +398 -0
- package/dist/client-streams-YKANXMWO.mjs +112 -0
- package/dist/codegen/cli.mjs +4 -4
- package/dist/codegen/index.d.ts +36 -29
- package/dist/codegen/index.mjs +4 -4
- package/dist/core/index.d.ts +130 -115
- package/dist/core/index.mjs +387 -297
- package/dist/core/writer-worker.mjs +3 -3
- package/dist/database-CGDsXW1K.d.ts +959 -0
- package/dist/database-backup-DcLhxoa1.d.ts +143 -0
- package/dist/driver/better-sqlite3.d.ts +11 -10
- package/dist/driver/better-sqlite3.mjs +11 -11
- package/dist/driver/bun.d.ts +9 -8
- package/dist/driver/expo.d.ts +6 -7
- package/dist/driver/node.d.ts +11 -10
- package/dist/driver/node.mjs +13 -11
- package/dist/driver/wa-sqlite.d.ts +6 -6
- package/dist/errors-CJUkQ-KL.d.ts +199 -0
- package/dist/file-migrations/index.d.ts +20 -18
- package/dist/file-migrations/index.mjs +3 -3
- package/dist/forward-rpc-VRWFZXHN.mjs +44 -0
- package/dist/operation-registry-CGhNT-Sn.d.ts +96 -0
- package/dist/primary-wins-CHNOYuN7.d.ts +81 -0
- package/dist/protocol-DFpNNsIT.d.ts +153 -0
- package/dist/query-types-5B02ixH0.d.ts +129 -0
- package/dist/react/index.d.ts +22 -22
- package/dist/replication/coordinator/etcd.d.ts +37 -31
- package/dist/replication/coordinator/etcd.mjs +296 -131
- package/dist/replication/index.d.ts +201 -161
- package/dist/replication/index.mjs +630 -529
- package/dist/restore-options-CH8mE-Tb.d.ts +84 -0
- package/dist/server/index.d.ts +201 -191
- package/dist/server/index.mjs +736 -619
- package/dist/server-options-aYtCkefX.d.ts +317 -0
- package/dist/server-streams-24XL4T43.mjs +254 -0
- package/dist/sirannon-J3EgPVD7.d.ts +179 -0
- package/dist/transport/grpc.d.ts +37 -24
- package/dist/transport/grpc.mjs +83 -3199
- package/dist/transport/memory.d.ts +25 -26
- package/dist/transport/memory.mjs +18 -9
- package/dist/types-BrAiDGOb.d.ts +505 -0
- package/dist/types-CEJG0eFS.d.ts +88 -0
- package/dist/types-Dc8oWlxj.d.ts +1580 -0
- package/dist/types-DqODKeOq.d.ts +123 -0
- package/dist/types-guEKSzMr.d.ts +367 -0
- package/package.json +7 -7
- package/dist/baseline-D93hcIEE.d.ts +0 -17
- package/dist/change-tracker-CjRFuZdB.d.ts +0 -144
- package/dist/client-base-Cmd9EVme.d.ts +0 -397
- package/dist/database-BLQvqjsw.d.ts +0 -917
- package/dist/database-backup-B7oszQ2n.d.ts +0 -141
- package/dist/errors-Dei4GdBb.d.ts +0 -196
- package/dist/operation-registry-oiPuSYI6.d.ts +0 -94
- package/dist/primary-wins-B0np8JS3.d.ts +0 -85
- package/dist/protocol-HI-nY8DD.d.ts +0 -152
- package/dist/query-types-p1liOP-b.d.ts +0 -127
- package/dist/restore-options-CksYsH1l.d.ts +0 -83
- package/dist/server-options-Bj5iJnjx.d.ts +0 -292
- package/dist/sirannon-BPxC5tC2.d.ts +0 -178
- package/dist/types-B0EhgDbr.d.ts +0 -340
- package/dist/types-CbjfRwrK.d.ts +0 -499
- package/dist/types-CjhxcjhA.d.ts +0 -123
- package/dist/types-DPSmjU54.d.ts +0 -1518
- package/dist/types-DTO4CYhW.d.ts +0 -88
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/** Describes a hybrid logical clock reading, decoded into its three parts.
|
|
2
|
+
* @public
|
|
3
|
+
*/
|
|
4
|
+
interface HLCTimestamp {
|
|
5
|
+
/** The wall-clock milliseconds since the Unix epoch. */
|
|
6
|
+
wallMs: number;
|
|
7
|
+
/** The counter that orders events within one wall-clock millisecond. */
|
|
8
|
+
logical: number;
|
|
9
|
+
/** The ID of the node that took the reading, which orders two readings with the same time and counter. */
|
|
10
|
+
nodeId: string;
|
|
11
|
+
}
|
|
12
|
+
/** Describes one replicated row change or one replicated schema statement.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
interface ReplicationChange {
|
|
16
|
+
/** The table that the change modifies. */
|
|
17
|
+
table: string;
|
|
18
|
+
/** The row operation, or `'ddl'` for a schema statement. */
|
|
19
|
+
operation: 'insert' | 'update' | 'delete' | 'ddl';
|
|
20
|
+
/** The primary key of the changed row, encoded as a string. */
|
|
21
|
+
rowId: string;
|
|
22
|
+
/** The primary key of the changed row, keyed by column. */
|
|
23
|
+
primaryKey: Record<string, unknown>;
|
|
24
|
+
/** The hybrid logical clock stamp that the authoring node gave this change. */
|
|
25
|
+
hlc: string;
|
|
26
|
+
/** The ID of the transaction that made this change. */
|
|
27
|
+
txId: string;
|
|
28
|
+
/** The ID of the node that wrote the change. */
|
|
29
|
+
nodeId: string;
|
|
30
|
+
/** The row after the change, or null for a delete. */
|
|
31
|
+
newData: Record<string, unknown> | null;
|
|
32
|
+
/** The row before the change, or null for an insert. */
|
|
33
|
+
oldData: Record<string, unknown> | null;
|
|
34
|
+
/** The schema statement to replay, set only when the operation is `'ddl'`. */
|
|
35
|
+
ddlStatement?: string;
|
|
36
|
+
}
|
|
37
|
+
/** Describes a checksummed run of changes that one node sends to another.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
interface ReplicationBatch {
|
|
41
|
+
/** The ID of the node that sent the batch. */
|
|
42
|
+
sourceNodeId: string;
|
|
43
|
+
/** The batch ID, which the receiving node acknowledges. */
|
|
44
|
+
batchId: string;
|
|
45
|
+
/** The change-log sequence number of the first change in the batch. */
|
|
46
|
+
fromSeq: bigint;
|
|
47
|
+
/** The change-log sequence number of the last change in the batch. */
|
|
48
|
+
toSeq: bigint;
|
|
49
|
+
/** The lowest and highest hybrid logical clock stamps among the batch's changes. */
|
|
50
|
+
hlcRange: {
|
|
51
|
+
min: string;
|
|
52
|
+
max: string;
|
|
53
|
+
};
|
|
54
|
+
/** The changes, in ascending sequence order. */
|
|
55
|
+
changes: ReplicationChange[];
|
|
56
|
+
/** The checksum of the changes, which the receiving node verifies before it applies them. */
|
|
57
|
+
checksum: string;
|
|
58
|
+
/** The ID of the sending node's replication group. */
|
|
59
|
+
groupId?: string;
|
|
60
|
+
/** The sending node's primary term at the time it built the batch. */
|
|
61
|
+
primaryTerm?: bigint;
|
|
62
|
+
}
|
|
63
|
+
/** The local and incoming versions of one row, which Sirannon passes to a conflict resolver.
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
interface ConflictContext {
|
|
67
|
+
/** The table that holds the row. */
|
|
68
|
+
table: string;
|
|
69
|
+
/** The row's primary key, encoded as a string. */
|
|
70
|
+
rowId: string;
|
|
71
|
+
/** The local version of the row as a change, or null when the receiving node has none. */
|
|
72
|
+
localChange: ReplicationChange | null;
|
|
73
|
+
/** The change from the sending node. */
|
|
74
|
+
remoteChange: ReplicationChange;
|
|
75
|
+
/** The hybrid logical clock stamp of the local version, or null when the local row has no stamp. */
|
|
76
|
+
localHlc: string | null;
|
|
77
|
+
/** The hybrid logical clock stamp of the incoming version. */
|
|
78
|
+
remoteHlc: string;
|
|
79
|
+
}
|
|
80
|
+
/** Describes a conflict resolver's decision for one row.
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
interface ConflictResolution {
|
|
84
|
+
/** Whether to take the incoming row, keep the local one, or write the merged row. */
|
|
85
|
+
action: 'accept_remote' | 'keep_local' | 'merge';
|
|
86
|
+
/** The row to write, which a `'merge'` action requires. */
|
|
87
|
+
mergedData?: Record<string, unknown>;
|
|
88
|
+
}
|
|
89
|
+
/** Chooses the version of a row to keep when an incoming change targets a row that already exists locally.
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
92
|
+
interface ConflictResolver {
|
|
93
|
+
/** Chooses between the local and the incoming version of one row. */
|
|
94
|
+
resolve(ctx: ConflictContext): ConflictResolution | Promise<ConflictResolution>;
|
|
95
|
+
}
|
|
96
|
+
/** Describes the outcome of applying one batch of changes.
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
interface ApplyResult {
|
|
100
|
+
/** The number of changes that the receiving node applied. */
|
|
101
|
+
applied: number;
|
|
102
|
+
/** The number of changes that the receiving node skipped, such as the changes of an already applied batch, an update to a missing row, or a change that lost to the local row. */
|
|
103
|
+
skipped: number;
|
|
104
|
+
/** The number of changes that a conflict resolver settled. */
|
|
105
|
+
conflicts: number;
|
|
106
|
+
/** The tables that the batch's `DROP TABLE` statements removed, so that the caller can prune them from the change tracker. */
|
|
107
|
+
droppedTables: string[];
|
|
108
|
+
}
|
|
109
|
+
/** Describes what a source node reports about one table at the end of the first sync, so that the joining node can verify the table.
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
interface SyncTableManifest {
|
|
113
|
+
/** The table name. */
|
|
114
|
+
table: string;
|
|
115
|
+
/** The number of rows in that table on the source node. */
|
|
116
|
+
rowCount: number;
|
|
117
|
+
/** A hash of every primary key in the table, in order. */
|
|
118
|
+
pkHash?: string;
|
|
119
|
+
/** The chained digest of the batches that the source node streamed for this table. */
|
|
120
|
+
batchDigest?: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type { ApplyResult as A, ConflictResolver as C, HLCTimestamp as H, ReplicationBatch as R, SyncTableManifest as S, ConflictContext as a, ConflictResolution as b, ReplicationChange as c };
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names what a lease grants, which is either the controller role or one node's membership session.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
type CoordinatorLeaseKind = 'controller' | 'node-session';
|
|
7
|
+
/**
|
|
8
|
+
* Stops a coordinator watch. Every watch method returns one of these functions.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
type CoordinatorWatchDisposer = () => void | Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Describes a time-limited claim that one node holds, which expires unless the node renews it.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
interface CoordinatorLease {
|
|
19
|
+
/** Identifies the lease, and the holder passes this ID to renew or release it. */
|
|
20
|
+
id: string;
|
|
21
|
+
/** Names what the lease grants. */
|
|
22
|
+
kind: CoordinatorLeaseKind;
|
|
23
|
+
/** Identifies the cluster that the lease covers. */
|
|
24
|
+
clusterId: string;
|
|
25
|
+
/** Identifies the node that holds the lease. */
|
|
26
|
+
holderId: string;
|
|
27
|
+
/** Holds how many milliseconds the lease lasts after each renewal. */
|
|
28
|
+
ttlMs: number;
|
|
29
|
+
/** Holds the time, in milliseconds since the Unix epoch, at which the coordinator granted or last renewed the lease. */
|
|
30
|
+
grantedAtMs: number;
|
|
31
|
+
/** Holds the time, in milliseconds since the Unix epoch, after which the lease expires. */
|
|
32
|
+
expiresAtMs: number;
|
|
33
|
+
/** Holds any other data that the holder attaches. */
|
|
34
|
+
metadata?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Describes a node's request for the controller lease.
|
|
38
|
+
*
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
interface AcquireControllerLeaseInput {
|
|
42
|
+
/** Identifies the cluster that the lease covers. */
|
|
43
|
+
clusterId: string;
|
|
44
|
+
/** Sets the ID that the node holds the lease under. */
|
|
45
|
+
holderId: string;
|
|
46
|
+
/** Sets how many milliseconds the lease lasts. */
|
|
47
|
+
ttlMs: number;
|
|
48
|
+
/** Holds any other data to record with the lease. */
|
|
49
|
+
metadata?: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Reports whether the request acquired the controller lease, along with the current lease either way.
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
type AcquireControllerLeaseResult = {
|
|
57
|
+
/** Is true when this request acquired the lease. */
|
|
58
|
+
acquired: true;
|
|
59
|
+
/** Holds the lease that this request acquired, with its holder and expiry. */
|
|
60
|
+
lease: CoordinatorLease;
|
|
61
|
+
} | {
|
|
62
|
+
/** Is false when another lease on the controller role is still live. */
|
|
63
|
+
acquired: false;
|
|
64
|
+
/** Holds the current holder's lease, or null when no node holds the lease. */
|
|
65
|
+
lease: CoordinatorLease | null;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Holds the versions that a node publishes. A node can be promoted, or accept writes as primary, only when its major
|
|
69
|
+
* versions match every version that the group requires.
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
interface CoordinatorCompatibilityMetadata {
|
|
74
|
+
/** Holds the version of the package that the node has installed. */
|
|
75
|
+
packageVersion?: string;
|
|
76
|
+
/** Holds the version of the specification that the node implements. */
|
|
77
|
+
specVersion?: string;
|
|
78
|
+
/** Holds the version of the replication protocol that the node uses. */
|
|
79
|
+
protocolVersion?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Describes a node to the coordinator when the node registers its session.
|
|
83
|
+
*
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
interface RegisterNodeSessionInput {
|
|
87
|
+
/** Identifies the cluster that the node joins. */
|
|
88
|
+
clusterId: string;
|
|
89
|
+
/** Identifies the node. */
|
|
90
|
+
nodeId: string;
|
|
91
|
+
/** Sets how many milliseconds the session lasts after each renewal. */
|
|
92
|
+
ttlMs: number;
|
|
93
|
+
/** Sets the address that clients use to reach this node. */
|
|
94
|
+
endpoint?: string;
|
|
95
|
+
/** Lists the replication groups that the node serves. */
|
|
96
|
+
groupIds?: string[];
|
|
97
|
+
/** Is true when the node stores a copy of the data. */
|
|
98
|
+
dataBearing?: boolean;
|
|
99
|
+
/** Is true when the node counts towards the majority. */
|
|
100
|
+
voting?: boolean;
|
|
101
|
+
/** Holds the versions that the node publishes. */
|
|
102
|
+
compatibility?: CoordinatorCompatibilityMetadata;
|
|
103
|
+
/** Holds any other data to record with the session. */
|
|
104
|
+
metadata?: Record<string, unknown>;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Describes one node's live membership of a cluster, which ends when its lease expires.
|
|
108
|
+
*
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
interface CoordinatorNodeSession {
|
|
112
|
+
/** Identifies the cluster that the node is a member of. */
|
|
113
|
+
clusterId: string;
|
|
114
|
+
/** Identifies the node. */
|
|
115
|
+
nodeId: string;
|
|
116
|
+
/** Holds the lease whose expiry ends this session. */
|
|
117
|
+
lease: CoordinatorLease;
|
|
118
|
+
/** Holds the address that clients use to reach this node. */
|
|
119
|
+
endpoint?: string;
|
|
120
|
+
/** Lists the replication groups that the node serves. */
|
|
121
|
+
groupIds: string[];
|
|
122
|
+
/** Is true when the node stores a copy of the data. */
|
|
123
|
+
dataBearing: boolean;
|
|
124
|
+
/** Is true when the node counts towards the majority. */
|
|
125
|
+
voting: boolean;
|
|
126
|
+
/** Holds the versions that the node publishes. */
|
|
127
|
+
compatibility?: CoordinatorCompatibilityMetadata;
|
|
128
|
+
/** Holds any other data that the node records with the session. */
|
|
129
|
+
metadata?: Record<string, unknown>;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Identifies a group's primary node and its address.
|
|
133
|
+
*
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
interface CoordinatorPrimary {
|
|
137
|
+
/** Identifies the primary. */
|
|
138
|
+
nodeId: string;
|
|
139
|
+
/** Holds the address that clients use to reach the primary. */
|
|
140
|
+
endpoint?: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Records which node writes for the group, which nodes are in sync, and how
|
|
144
|
+
* far the data is durable. The controller reads and updates this record during
|
|
145
|
+
* failover.
|
|
146
|
+
*
|
|
147
|
+
* @public
|
|
148
|
+
*/
|
|
149
|
+
interface ReplicationGroupState {
|
|
150
|
+
/** Identifies the cluster that contains the group. */
|
|
151
|
+
clusterId: string;
|
|
152
|
+
/** Identifies the group. */
|
|
153
|
+
groupId: string;
|
|
154
|
+
/** Lists the nodes that count towards the majority. */
|
|
155
|
+
votingDataBearingNodeIds: string[];
|
|
156
|
+
/** Identifies the current primary, or is null when the group has none. */
|
|
157
|
+
currentPrimary: CoordinatorPrimary | null;
|
|
158
|
+
/** Holds the current primary's term, which rises by one with each promotion. */
|
|
159
|
+
primaryTerm: bigint;
|
|
160
|
+
/** Holds the change-log position up to which a majority of voting nodes stores the data durably. */
|
|
161
|
+
durabilityPointSeq: bigint;
|
|
162
|
+
/** Lists the nodes that are in sync with the primary. */
|
|
163
|
+
inSyncNodeIds: string[];
|
|
164
|
+
/** Lists the draining nodes, which are leaving service. */
|
|
165
|
+
drainingNodeIds: string[];
|
|
166
|
+
/** Lists the repairing nodes, which are rebuilding their copy of the data. */
|
|
167
|
+
repairingNodeIds: string[];
|
|
168
|
+
/** Lists the faulted nodes, which stay out of service until an `updateNodeMaintenance` call clears the flag. */
|
|
169
|
+
faultedNodeIds: string[];
|
|
170
|
+
/** Holds the versions that the group requires of its members. */
|
|
171
|
+
compatibility?: CoordinatorCompatibilityMetadata;
|
|
172
|
+
/** Holds the time, in milliseconds since the Unix epoch, of the last change to this state. */
|
|
173
|
+
updatedAtMs: number;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Describes the group state to write, which creates a new group or replaces an existing one.
|
|
177
|
+
*
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
interface SetReplicationGroupStateInput {
|
|
181
|
+
/** Identifies the cluster that contains the group. */
|
|
182
|
+
clusterId: string;
|
|
183
|
+
/** Identifies the group. */
|
|
184
|
+
groupId: string;
|
|
185
|
+
/** Lists the nodes that count towards the majority. */
|
|
186
|
+
votingDataBearingNodeIds: string[];
|
|
187
|
+
/** Identifies the node to make primary, or null to leave the group without a primary. */
|
|
188
|
+
currentPrimary?: CoordinatorPrimary | null;
|
|
189
|
+
/** Sets the term to record for that primary, which defaults to 0. */
|
|
190
|
+
primaryTerm?: bigint;
|
|
191
|
+
/** Sets the change-log position up to which a majority stores the data durably. */
|
|
192
|
+
durabilityPointSeq?: bigint;
|
|
193
|
+
/** Lists the nodes to record as in sync. */
|
|
194
|
+
inSyncNodeIds?: string[];
|
|
195
|
+
/** Lists the nodes to record as draining. */
|
|
196
|
+
drainingNodeIds?: string[];
|
|
197
|
+
/** Lists the nodes to record as repairing. */
|
|
198
|
+
repairingNodeIds?: string[];
|
|
199
|
+
/** Lists the nodes to record as faulted. */
|
|
200
|
+
faultedNodeIds?: string[];
|
|
201
|
+
/** Sets the versions that the group requires of its members. */
|
|
202
|
+
compatibility?: CoordinatorCompatibilityMetadata;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Describes a promotion that takes effect only while the group is still at the
|
|
206
|
+
* term that the caller expects, so that two candidates cannot both promote
|
|
207
|
+
* themselves.
|
|
208
|
+
*
|
|
209
|
+
* @public
|
|
210
|
+
*/
|
|
211
|
+
interface CompareAndAdvancePrimaryTermInput {
|
|
212
|
+
/** Identifies the cluster that contains the group. */
|
|
213
|
+
clusterId: string;
|
|
214
|
+
/** Identifies the group. */
|
|
215
|
+
groupId: string;
|
|
216
|
+
/** Holds the term that the caller last read. The promotion fails when the group's term differs. */
|
|
217
|
+
expectedPrimaryTerm: bigint;
|
|
218
|
+
/** Identifies the node to promote. */
|
|
219
|
+
nextPrimary: CoordinatorPrimary;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Reports whether the promotion took effect, along with the group state afterwards.
|
|
223
|
+
*
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
226
|
+
interface CompareAndAdvancePrimaryTermResult {
|
|
227
|
+
/** Is true when the group moves to the next term under the new primary. */
|
|
228
|
+
advanced: boolean;
|
|
229
|
+
/** Holds the current group state, or null when the coordinator has no state for the group. */
|
|
230
|
+
state: ReplicationGroupState | null;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Describes a new in-sync set for the group, and optionally a new durability point. To add a node, call
|
|
234
|
+
* {@link ClusterCoordinator.admitNodeToInSyncSet}, because this update throws a `RangeError` for any node outside the
|
|
235
|
+
* current set.
|
|
236
|
+
*
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
interface UpdateInSyncSetInput {
|
|
240
|
+
/** Identifies the cluster that contains the group. */
|
|
241
|
+
clusterId: string;
|
|
242
|
+
/** Identifies the group. */
|
|
243
|
+
groupId: string;
|
|
244
|
+
/** Lists the nodes to record as in sync. */
|
|
245
|
+
inSyncNodeIds: string[];
|
|
246
|
+
/** Sets the change-log position up to which a majority stores the data durably, and the coordinator keeps the higher of this value and the current one. */
|
|
247
|
+
durabilityPointSeq?: bigint;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Describes one caught-up node to add to the in-sync set, with the progress
|
|
251
|
+
* that qualifies it. The coordinator admits the node only when `sourceNodeId`
|
|
252
|
+
* is the current primary, `appliedSeq` reaches the group's durability point,
|
|
253
|
+
* and the node is neither draining nor faulted.
|
|
254
|
+
*
|
|
255
|
+
* @public
|
|
256
|
+
*/
|
|
257
|
+
interface AdmitNodeToInSyncSetInput {
|
|
258
|
+
/** Identifies the cluster that contains the group. */
|
|
259
|
+
clusterId: string;
|
|
260
|
+
/** Identifies the group. */
|
|
261
|
+
groupId: string;
|
|
262
|
+
/** Identifies the node to admit. */
|
|
263
|
+
nodeId: string;
|
|
264
|
+
/** Identifies the node whose changes the admitted node applied. */
|
|
265
|
+
sourceNodeId: string;
|
|
266
|
+
/** Holds the change-log position up to which the node applied those changes. */
|
|
267
|
+
appliedSeq: bigint;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Sets or clears one node's draining, repairing, and faulted flags. A flag left
|
|
271
|
+
* undefined keeps its current value, and when any flag turns on, the
|
|
272
|
+
* coordinator removes the node from the in-sync set.
|
|
273
|
+
*
|
|
274
|
+
* @public
|
|
275
|
+
*/
|
|
276
|
+
interface UpdateNodeMaintenanceInput {
|
|
277
|
+
/** Identifies the cluster that contains the group. */
|
|
278
|
+
clusterId: string;
|
|
279
|
+
/** Identifies the group. */
|
|
280
|
+
groupId: string;
|
|
281
|
+
/** Identifies the node to update. */
|
|
282
|
+
nodeId: string;
|
|
283
|
+
/** Sets whether the node is draining, which takes it out of service. */
|
|
284
|
+
draining?: boolean;
|
|
285
|
+
/** Sets whether the node is repairing, which means that it rebuilds its copy of the data. */
|
|
286
|
+
repairing?: boolean;
|
|
287
|
+
/** Sets whether the node is faulted, which keeps it out of service. */
|
|
288
|
+
faulted?: boolean;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Describes a request to promote an eligible in-sync replica, which is one with
|
|
292
|
+
* a live, compatible session that is neither draining, repairing, nor faulted.
|
|
293
|
+
*
|
|
294
|
+
* @public
|
|
295
|
+
*/
|
|
296
|
+
interface PromoteEligibleReplicaInput {
|
|
297
|
+
/** Identifies the cluster that contains the group. */
|
|
298
|
+
clusterId: string;
|
|
299
|
+
/** Identifies the group. */
|
|
300
|
+
groupId: string;
|
|
301
|
+
/** Lists the nodes to skip, such as the primary that has just failed. */
|
|
302
|
+
excludeNodeIds?: string[];
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Receives the group state each time it changes.
|
|
306
|
+
*
|
|
307
|
+
* @public
|
|
308
|
+
*/
|
|
309
|
+
type ReplicationGroupWatcher = (state: ReplicationGroupState) => void;
|
|
310
|
+
/**
|
|
311
|
+
* Receives the IDs of every node that holds a live session, when the watch starts and after each session change.
|
|
312
|
+
*
|
|
313
|
+
* @public
|
|
314
|
+
*/
|
|
315
|
+
type NodeSessionWatcher = (liveNodeIds: readonly string[]) => void;
|
|
316
|
+
/**
|
|
317
|
+
* Receives the controller lease when the watch starts and after each change, or null while no node holds the lease.
|
|
318
|
+
*
|
|
319
|
+
* @public
|
|
320
|
+
*/
|
|
321
|
+
type ControllerLeaseWatcher = (lease: CoordinatorLease | null) => void;
|
|
322
|
+
/**
|
|
323
|
+
* Stores primary authority, node sessions, group state, and the in-sync set
|
|
324
|
+
* outside the database nodes, so that the record stays intact when any one
|
|
325
|
+
* database node fails. Sirannon includes an etcd coordinator, and you can
|
|
326
|
+
* implement this interface to store the record elsewhere.
|
|
327
|
+
*
|
|
328
|
+
* @public
|
|
329
|
+
*/
|
|
330
|
+
interface ClusterCoordinator {
|
|
331
|
+
/** Tries to acquire the controller lease, and returns whether it succeeded along with the current lease. */
|
|
332
|
+
tryAcquireControllerLease(input: AcquireControllerLeaseInput): Promise<AcquireControllerLeaseResult>;
|
|
333
|
+
/** Calls `watcher` with the current controller lease when the watch starts and after each change, and returns a function that stops the watch. A coordinator without this watch can omit the method, and every node's controller loop then tries to acquire the lease on each tick. */
|
|
334
|
+
watchControllerLease?(clusterId: string, watcher: ControllerLeaseWatcher): CoordinatorWatchDisposer | Promise<CoordinatorWatchDisposer>;
|
|
335
|
+
/** Extends a lease, and returns false for a lease that is expired or unknown to this coordinator. */
|
|
336
|
+
renewLease(leaseId: string, ttlMs: number): Promise<boolean>;
|
|
337
|
+
/** Releases a lease at once, and returns whether the release succeeded. */
|
|
338
|
+
releaseLease(leaseId: string): Promise<boolean>;
|
|
339
|
+
/** Records one node as a live member of the cluster. */
|
|
340
|
+
registerNodeSession(input: RegisterNodeSessionInput): Promise<CoordinatorNodeSession>;
|
|
341
|
+
/** Returns one node's session, or null once its lease expires. */
|
|
342
|
+
getLiveNodeSession(clusterId: string, nodeId: string): Promise<CoordinatorNodeSession | null>;
|
|
343
|
+
/** Ends one node's session at once. */
|
|
344
|
+
deregisterNodeSession(clusterId: string, nodeId: string): Promise<void>;
|
|
345
|
+
/** Calls `watcher` with the IDs of every node that holds a live session, and returns a function that stops the watch. A coordinator without this watch can omit the method, and a node then lists read endpoints from the group state alone. */
|
|
346
|
+
watchNodeSessions?(clusterId: string, watcher: NodeSessionWatcher): CoordinatorWatchDisposer | Promise<CoordinatorWatchDisposer>;
|
|
347
|
+
/** Writes the group's state, which creates a new group or replaces an existing one. */
|
|
348
|
+
setReplicationGroupState(input: SetReplicationGroupStateInput): Promise<ReplicationGroupState>;
|
|
349
|
+
/** Returns the group's state, or null when the coordinator has no state for the group. */
|
|
350
|
+
getReplicationGroupState(clusterId: string, groupId: string): Promise<ReplicationGroupState | null>;
|
|
351
|
+
/** Calls `watcher` with the new state after each change to the group, and returns a function that stops the watch. */
|
|
352
|
+
watchReplicationGroup(clusterId: string, groupId: string, watcher: ReplicationGroupWatcher): CoordinatorWatchDisposer | Promise<CoordinatorWatchDisposer>;
|
|
353
|
+
/** Makes a node primary and advances the term, but only while the group is still at the term that the caller expects. */
|
|
354
|
+
compareAndAdvancePrimaryTerm(input: CompareAndAdvancePrimaryTermInput): Promise<CompareAndAdvancePrimaryTermResult>;
|
|
355
|
+
/** Replaces the group's in-sync set with a subset of it, and can advance the durability point. */
|
|
356
|
+
updateInSyncSet(input: UpdateInSyncSetInput): Promise<ReplicationGroupState | null>;
|
|
357
|
+
/** Adds one caught-up node to the in-sync set. */
|
|
358
|
+
admitNodeToInSyncSet(input: AdmitNodeToInSyncSetInput): Promise<ReplicationGroupState | null>;
|
|
359
|
+
/** Sets or clears one node's draining, repairing, and faulted flags. */
|
|
360
|
+
updateNodeMaintenance(input: UpdateNodeMaintenanceInput): Promise<ReplicationGroupState | null>;
|
|
361
|
+
/** Promotes an eligible in-sync replica, and throws a `NoSafePrimaryError` when no replica qualifies. */
|
|
362
|
+
promoteEligibleReplica(input: PromoteEligibleReplicaInput): Promise<ReplicationGroupState>;
|
|
363
|
+
/** Releases every connection, watch, and lease that the coordinator keeps open. */
|
|
364
|
+
close?(): Promise<void>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export type { AcquireControllerLeaseInput as A, ClusterCoordinator as C, NodeSessionWatcher as N, PromoteEligibleReplicaInput as P, RegisterNodeSessionInput as R, SetReplicationGroupStateInput as S, UpdateInSyncSetInput as U, AcquireControllerLeaseResult as a, ControllerLeaseWatcher as b, CoordinatorWatchDisposer as c, CoordinatorNodeSession as d, ReplicationGroupState as e, ReplicationGroupWatcher as f, CompareAndAdvancePrimaryTermInput as g, CompareAndAdvancePrimaryTermResult as h, AdmitNodeToInSyncSetInput as i, UpdateNodeMaintenanceInput as j, CoordinatorCompatibilityMetadata as k, CoordinatorLease as l, CoordinatorPrimary as m };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delali/sirannon-db",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.4
|
|
4
|
+
"version": "0.3.4",
|
|
5
5
|
"description": "A production-grade library that turns SQLite databases into a networked data layer with real-time subscriptions.",
|
|
6
6
|
"author": "Delali (https://sondelali.com)",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -210,11 +210,11 @@
|
|
|
210
210
|
"vitest": "4.0.18"
|
|
211
211
|
},
|
|
212
212
|
"optionalDependencies": {
|
|
213
|
-
"@delali/sirannon-vfs-darwin-arm64": "0.3.4
|
|
214
|
-
"@delali/sirannon-vfs-darwin-x64": "0.3.4
|
|
215
|
-
"@delali/sirannon-vfs-linux-arm64": "0.3.4
|
|
216
|
-
"@delali/sirannon-vfs-linux-x64": "0.3.4
|
|
217
|
-
"@delali/sirannon-vfs-win32-arm64": "0.3.4
|
|
218
|
-
"@delali/sirannon-vfs-win32-x64": "0.3.4
|
|
213
|
+
"@delali/sirannon-vfs-darwin-arm64": "0.3.4",
|
|
214
|
+
"@delali/sirannon-vfs-darwin-x64": "0.3.4",
|
|
215
|
+
"@delali/sirannon-vfs-linux-arm64": "0.3.4",
|
|
216
|
+
"@delali/sirannon-vfs-linux-x64": "0.3.4",
|
|
217
|
+
"@delali/sirannon-vfs-win32-arm64": "0.3.4",
|
|
218
|
+
"@delali/sirannon-vfs-win32-x64": "0.3.4"
|
|
219
219
|
}
|
|
220
220
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Marks the migration an existing database starts from, so earlier versions are recorded without running.
|
|
3
|
-
*
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
interface BaselineFileOption {
|
|
7
|
-
/**
|
|
8
|
-
* Version of the migration carrying the baseline.
|
|
9
|
-
*/
|
|
10
|
-
version: number;
|
|
11
|
-
/**
|
|
12
|
-
* Highest version this baseline covers.
|
|
13
|
-
*/
|
|
14
|
-
through: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type { BaselineFileOption as B };
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { I as SQLiteConnection } from './types-DPSmjU54.js';
|
|
2
|
-
import { C as ChangeEvent } from './query-types-p1liOP-b.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* How long a change tracker keeps changes, and how much it reads at a time.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
interface ChangeTrackerOptions {
|
|
10
|
-
/**
|
|
11
|
-
* Milliseconds a change stays readable before it is pruned. Default: 3_600_000 (one hour).
|
|
12
|
-
*/
|
|
13
|
-
retention?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Name of the table changes are recorded in.
|
|
16
|
-
*/
|
|
17
|
-
changesTable?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Changes read in one poll. Default: 1000.
|
|
20
|
-
*/
|
|
21
|
-
pollBatchSize?: number;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Records every change to the tables you watch so that subscribers and replication can read them in order.
|
|
26
|
-
*
|
|
27
|
-
* Construct one, watch the tables you want captured, and pass it to a replication engine or leave it to the database that owns it.
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
declare class ChangeTracker {
|
|
32
|
-
private readonly watched;
|
|
33
|
-
private lastSeq;
|
|
34
|
-
private readonly retentionMs;
|
|
35
|
-
private readonly changesTable;
|
|
36
|
-
private readonly pollBatchSize;
|
|
37
|
-
private changesTableReady;
|
|
38
|
-
private changesTableEnsured;
|
|
39
|
-
private watchedTablesCache;
|
|
40
|
-
private readonly stmtCache;
|
|
41
|
-
private pruneBoundary;
|
|
42
|
-
private lastPollAtTxBoundary;
|
|
43
|
-
constructor(options?: ChangeTrackerOptions);
|
|
44
|
-
/**
|
|
45
|
-
* Starts recording changes to a table by installing its change-capture triggers.
|
|
46
|
-
*
|
|
47
|
-
* @param conn - Writer connection the triggers are created on.
|
|
48
|
-
* @param table - Name of the table to watch.
|
|
49
|
-
*/
|
|
50
|
-
watch(conn: SQLiteConnection, table: string): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Stops recording changes to a table and drops its triggers.
|
|
53
|
-
*
|
|
54
|
-
* @param conn - Writer connection the triggers are dropped from.
|
|
55
|
-
* @param table - Name of the table to stop watching.
|
|
56
|
-
*/
|
|
57
|
-
unwatch(conn: SQLiteConnection, table: string): Promise<void>;
|
|
58
|
-
/**
|
|
59
|
-
* Rebuilds CDC triggers for every watched table directly on the supplied
|
|
60
|
-
* connection, without opening a nested transaction.
|
|
61
|
-
*
|
|
62
|
-
* Required when a caller has already issued `BEGIN` on `conn` and runs a
|
|
63
|
-
* DDL statement that changes a watched table's column list: the next DML
|
|
64
|
-
* inside the same transaction must see triggers compiled against the new
|
|
65
|
-
* columns, otherwise CDC `new_data` silently omits them. Callers that are
|
|
66
|
-
* not inside an active transaction may also use this method; CREATE
|
|
67
|
-
* TRIGGER and DROP TRIGGER statements are committed individually by the
|
|
68
|
-
* driver in that case.
|
|
69
|
-
*
|
|
70
|
-
* Failure semantics:
|
|
71
|
-
* - If a watched table no longer exists (e.g. it was just dropped by the
|
|
72
|
-
* DDL), it is skipped. The watched-map entry is left alone so a separate
|
|
73
|
-
* cleanup path can handle it; throwing here would roll back the user's
|
|
74
|
-
* transaction over a benign condition.
|
|
75
|
-
* - If reading column metadata succeeds but the column list is unchanged,
|
|
76
|
-
* no triggers are touched.
|
|
77
|
-
* - If reading column metadata succeeds and the column list differs from
|
|
78
|
-
* the cached one, the existing triggers are dropped and reinstalled on
|
|
79
|
-
* `conn`. The cached column list is updated on success.
|
|
80
|
-
* - Any other error (driver failure, identifier validation failure) is
|
|
81
|
-
* rethrown so the caller's transaction can roll back deterministically.
|
|
82
|
-
*
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
|
-
refreshAllTriggersUsingConnection(conn: SQLiteConnection): Promise<void>;
|
|
86
|
-
/**
|
|
87
|
-
* Removes the supplied tables from the watched map and drops any leftover
|
|
88
|
-
* CDC triggers carrying their identifier on the supplied connection.
|
|
89
|
-
*
|
|
90
|
-
* Intended to be called after a DDL transaction that dropped one or more
|
|
91
|
-
* watched tables has committed. On rollback the caller must not invoke
|
|
92
|
-
* this method; the rollback semantics rely on the caller discarding its
|
|
93
|
-
* captured drop list before reaching this call.
|
|
94
|
-
*
|
|
95
|
-
* Idempotent: tables not currently in the watched map are silently
|
|
96
|
-
* skipped. `dropCdcTriggers` issues `DROP TRIGGER IF EXISTS` so calling
|
|
97
|
-
* twice in succession produces the same state.
|
|
98
|
-
*
|
|
99
|
-
* Defence in depth: even after a `DROP TABLE`, the in-transaction trigger
|
|
100
|
-
* refresh path may have observed a freshly-created table of the same name
|
|
101
|
-
* (the DROP and CREATE happened inside the same transaction) and
|
|
102
|
-
* re-installed triggers compiled against the new schema. Those triggers
|
|
103
|
-
* are dropped here so the recreated table starts with a clean slate and
|
|
104
|
-
* the caller must explicitly `watch` it again.
|
|
105
|
-
*
|
|
106
|
-
* @internal
|
|
107
|
-
*/
|
|
108
|
-
pruneDroppedTables(conn: SQLiteConnection, tables: readonly string[]): Promise<void>;
|
|
109
|
-
/** @internal */
|
|
110
|
-
poll(conn: SQLiteConnection): Promise<ChangeEvent[]>;
|
|
111
|
-
/** @internal */
|
|
112
|
-
get pollEndedAtTxBoundary(): boolean;
|
|
113
|
-
/**
|
|
114
|
-
* The highest seq already polled; live subscribers receive events beyond it.
|
|
115
|
-
*
|
|
116
|
-
* @internal
|
|
117
|
-
*/
|
|
118
|
-
get cursor(): bigint;
|
|
119
|
-
/** @internal */
|
|
120
|
-
readSinceTables(conn: SQLiteConnection, tables: readonly string[], afterSeq: bigint, upToSeq: bigint, limit: number): Promise<ChangeEvent[]>;
|
|
121
|
-
/**
|
|
122
|
-
* The lowest retained seq, or `null` when the change log is empty.
|
|
123
|
-
*
|
|
124
|
-
* @internal
|
|
125
|
-
*/
|
|
126
|
-
getMinSeq(conn: SQLiteConnection): Promise<bigint | null>;
|
|
127
|
-
/** @internal */
|
|
128
|
-
advanceToLatest(conn: SQLiteConnection): Promise<void>;
|
|
129
|
-
/** @internal */
|
|
130
|
-
cleanup(conn: SQLiteConnection): Promise<number>;
|
|
131
|
-
/** @internal */
|
|
132
|
-
setPruneBoundary(seq: bigint): void;
|
|
133
|
-
/** @internal */
|
|
134
|
-
clearPruneBoundary(): void;
|
|
135
|
-
/** @internal */
|
|
136
|
-
get watchedTables(): ReadonlySet<string>;
|
|
137
|
-
private computeSeqBound;
|
|
138
|
-
private assertIdentifier;
|
|
139
|
-
private detectChangesTable;
|
|
140
|
-
private ensureChangesTable;
|
|
141
|
-
private installTriggers;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export { ChangeTracker as C, type ChangeTrackerOptions as a };
|