@spine-event-engine/storage 2.0.0-snapshot.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/LICENSE +201 -0
- package/README.md +160 -0
- package/REFERENCE.md +120 -0
- package/dist/entity/entity-history-record-spec.d.ts +26 -0
- package/dist/entity/entity-history-record-spec.d.ts.map +1 -0
- package/dist/entity/entity-history-record-spec.js +77 -0
- package/dist/entity/entity-history-record-spec.js.map +1 -0
- package/dist/entity/entity-history-storage.d.ts +111 -0
- package/dist/entity/entity-history-storage.d.ts.map +1 -0
- package/dist/entity/entity-history-storage.js +40 -0
- package/dist/entity/entity-history-storage.js.map +1 -0
- package/dist/entity/entity-record.d.ts +31 -0
- package/dist/entity/entity-record.d.ts.map +1 -0
- package/dist/entity/entity-record.js +15 -0
- package/dist/entity/entity-record.js.map +1 -0
- package/dist/entity/history-conformance.d.ts +55 -0
- package/dist/entity/history-conformance.d.ts.map +1 -0
- package/dist/entity/history-conformance.js +165 -0
- package/dist/entity/history-conformance.js.map +1 -0
- package/dist/event/event-store.d.ts +141 -0
- package/dist/event/event-store.d.ts.map +1 -0
- package/dist/event/event-store.js +407 -0
- package/dist/event/event-store.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/delivery-cleanup.d.ts +99 -0
- package/dist/internal/delivery-cleanup.d.ts.map +1 -0
- package/dist/internal/delivery-cleanup.js +38 -0
- package/dist/internal/delivery-cleanup.js.map +1 -0
- package/dist/internal/entity-commit.d.ts +108 -0
- package/dist/internal/entity-commit.d.ts.map +1 -0
- package/dist/internal/entity-commit.js +32 -0
- package/dist/internal/entity-commit.js.map +1 -0
- package/dist/internal/entity-history.d.ts +12 -0
- package/dist/internal/entity-history.d.ts.map +1 -0
- package/dist/internal/entity-history.js +17 -0
- package/dist/internal/entity-history.js.map +1 -0
- package/dist/internal/event-store.d.ts +8 -0
- package/dist/internal/event-store.d.ts.map +1 -0
- package/dist/internal/event-store.js +21 -0
- package/dist/internal/event-store.js.map +1 -0
- package/dist/internal/query-values.d.ts +5 -0
- package/dist/internal/query-values.d.ts.map +1 -0
- package/dist/internal/query-values.js +18 -0
- package/dist/internal/query-values.js.map +1 -0
- package/dist/internal/tenancy.d.ts +89 -0
- package/dist/internal/tenancy.d.ts.map +1 -0
- package/dist/internal/tenancy.js +97 -0
- package/dist/internal/tenancy.js.map +1 -0
- package/dist/memory/canonical-utf8.d.ts +21 -0
- package/dist/memory/canonical-utf8.d.ts.map +1 -0
- package/dist/memory/canonical-utf8.js +65 -0
- package/dist/memory/canonical-utf8.js.map +1 -0
- package/dist/memory/in-memory-entity-commit.d.ts +35 -0
- package/dist/memory/in-memory-entity-commit.d.ts.map +1 -0
- package/dist/memory/in-memory-entity-commit.js +183 -0
- package/dist/memory/in-memory-entity-commit.js.map +1 -0
- package/dist/memory/in-memory-entity-history.d.ts +379 -0
- package/dist/memory/in-memory-entity-history.d.ts.map +1 -0
- package/dist/memory/in-memory-entity-history.js +756 -0
- package/dist/memory/in-memory-entity-history.js.map +1 -0
- package/dist/memory/in-memory-record-storage.d.ts +78 -0
- package/dist/memory/in-memory-record-storage.d.ts.map +1 -0
- package/dist/memory/in-memory-record-storage.js +127 -0
- package/dist/memory/in-memory-record-storage.js.map +1 -0
- package/dist/memory/in-memory-storage-backend.d.ts +38 -0
- package/dist/memory/in-memory-storage-backend.d.ts.map +1 -0
- package/dist/memory/in-memory-storage-backend.js +108 -0
- package/dist/memory/in-memory-storage-backend.js.map +1 -0
- package/dist/memory/in-memory-storage-factory.d.ts +58 -0
- package/dist/memory/in-memory-storage-factory.d.ts.map +1 -0
- package/dist/memory/in-memory-storage-factory.js +148 -0
- package/dist/memory/in-memory-storage-factory.js.map +1 -0
- package/dist/memory/memory-delivery-cleanup.d.ts +32 -0
- package/dist/memory/memory-delivery-cleanup.d.ts.map +1 -0
- package/dist/memory/memory-delivery-cleanup.js +61 -0
- package/dist/memory/memory-delivery-cleanup.js.map +1 -0
- package/dist/memory/tenant-records.d.ts +66 -0
- package/dist/memory/tenant-records.d.ts.map +1 -0
- package/dist/memory/tenant-records.js +573 -0
- package/dist/memory/tenant-records.js.map +1 -0
- package/dist/query/query-execution.d.ts +50 -0
- package/dist/query/query-execution.d.ts.map +1 -0
- package/dist/query/query-execution.js +222 -0
- package/dist/query/query-execution.js.map +1 -0
- package/dist/query/query-policy.d.ts +115 -0
- package/dist/query/query-policy.d.ts.map +1 -0
- package/dist/query/query-policy.js +294 -0
- package/dist/query/query-policy.js.map +1 -0
- package/dist/record/column-mapping.d.ts +41 -0
- package/dist/record/column-mapping.d.ts.map +1 -0
- package/dist/record/column-mapping.js +36 -0
- package/dist/record/column-mapping.js.map +1 -0
- package/dist/record/column-type.d.ts +75 -0
- package/dist/record/column-type.d.ts.map +1 -0
- package/dist/record/column-type.js +69 -0
- package/dist/record/column-type.js.map +1 -0
- package/dist/record/record-column.d.ts +23 -0
- package/dist/record/record-column.d.ts.map +1 -0
- package/dist/record/record-column.js +41 -0
- package/dist/record/record-column.js.map +1 -0
- package/dist/record/record-mask.d.ts +11 -0
- package/dist/record/record-mask.d.ts.map +1 -0
- package/dist/record/record-mask.js +82 -0
- package/dist/record/record-mask.js.map +1 -0
- package/dist/record/record-query.d.ts +102 -0
- package/dist/record/record-query.d.ts.map +1 -0
- package/dist/record/record-query.js +44 -0
- package/dist/record/record-query.js.map +1 -0
- package/dist/record/record-spec.d.ts +101 -0
- package/dist/record/record-spec.d.ts.map +1 -0
- package/dist/record/record-spec.js +159 -0
- package/dist/record/record-spec.js.map +1 -0
- package/dist/record/record-storage.d.ts +202 -0
- package/dist/record/record-storage.d.ts.map +1 -0
- package/dist/record/record-storage.js +234 -0
- package/dist/record/record-storage.js.map +1 -0
- package/dist/record/storage-group.d.ts +17 -0
- package/dist/record/storage-group.d.ts.map +1 -0
- package/dist/record/storage-group.js +37 -0
- package/dist/record/storage-group.js.map +1 -0
- package/dist/storage/storage-factory.d.ts +44 -0
- package/dist/storage/storage-factory.d.ts.map +1 -0
- package/dist/storage/storage-factory.js +54 -0
- package/dist/storage/storage-factory.js.map +1 -0
- package/dist/storage/storage.d.ts +62 -0
- package/dist/storage/storage.d.ts.map +1 -0
- package/dist/storage/storage.js +15 -0
- package/dist/storage/storage.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
2
|
+
import type { GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
3
|
+
import { RecordColumn } from "./record-column.js";
|
|
4
|
+
/**
|
|
5
|
+
* Configures one direct Protobuf record family and its identity.
|
|
6
|
+
*/
|
|
7
|
+
export type RecordSpecOptions<I, R extends Message> = {
|
|
8
|
+
/**
|
|
9
|
+
* Original message type represented by the stored records.
|
|
10
|
+
*/
|
|
11
|
+
readonly sourceType?: GenMessage<Message>;
|
|
12
|
+
/**
|
|
13
|
+
* Protobuf record type stored by the family.
|
|
14
|
+
*/
|
|
15
|
+
readonly recordType: GenMessage<R>;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the authoritative identity extracted from a direct record.
|
|
18
|
+
*
|
|
19
|
+
* @param record Supplies the direct record.
|
|
20
|
+
* @returns The authoritative record identity.
|
|
21
|
+
*/
|
|
22
|
+
readonly extractId: (record: R) => I;
|
|
23
|
+
/**
|
|
24
|
+
* Declared query columns materialized from each record.
|
|
25
|
+
*/
|
|
26
|
+
readonly columns?: readonly RecordColumn<R>[];
|
|
27
|
+
} & ([I] extends [Message] ? {
|
|
28
|
+
/**
|
|
29
|
+
* Generated schema for a message-valued identity.
|
|
30
|
+
*/
|
|
31
|
+
readonly idSchema: GenMessage<I & Message>;
|
|
32
|
+
readonly idKind?: never;
|
|
33
|
+
} : {
|
|
34
|
+
readonly idSchema?: never;
|
|
35
|
+
/**
|
|
36
|
+
* Stable kind name for a primitive identity.
|
|
37
|
+
*/
|
|
38
|
+
readonly idKind: string;
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* Declarative specification for one identified Protobuf record type.
|
|
42
|
+
*/
|
|
43
|
+
export declare class RecordSpec<I, R extends Message> {
|
|
44
|
+
#private;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a record specification.
|
|
47
|
+
*
|
|
48
|
+
* @throws Error if the ID type is invalid or two declared columns have the same name.
|
|
49
|
+
* @param input The source, record, identity, and column definitions.
|
|
50
|
+
*/
|
|
51
|
+
constructor(input: RecordSpecOptions<I, R>);
|
|
52
|
+
/**
|
|
53
|
+
* Returns the original message type represented by these records.
|
|
54
|
+
* @returns The source message type.
|
|
55
|
+
*/
|
|
56
|
+
get sourceType(): GenMessage<Message>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns the type used to identify stored records.
|
|
59
|
+
* @returns The message ID type or primitive ID kind.
|
|
60
|
+
*/
|
|
61
|
+
get idType(): I extends Message ? GenMessage<I> : string;
|
|
62
|
+
/**
|
|
63
|
+
* Returns the Protobuf record type stored by this specification.
|
|
64
|
+
* @returns The managed record type.
|
|
65
|
+
*/
|
|
66
|
+
get recordType(): GenMessage<R>;
|
|
67
|
+
/**
|
|
68
|
+
* Returns the columns materialized from stored records.
|
|
69
|
+
* @returns The declared record columns.
|
|
70
|
+
*/
|
|
71
|
+
get columns(): readonly RecordColumn<R>[];
|
|
72
|
+
/**
|
|
73
|
+
* Copies an ID value according to this specification.
|
|
74
|
+
* @param id The ID to clone.
|
|
75
|
+
* @returns The cloned ID.
|
|
76
|
+
*/
|
|
77
|
+
cloneId(id: I): I;
|
|
78
|
+
/**
|
|
79
|
+
* Copies one record value according to this specification.
|
|
80
|
+
* @param record The record to clone.
|
|
81
|
+
* @returns The cloned record.
|
|
82
|
+
*/
|
|
83
|
+
cloneRecord(record: R): R;
|
|
84
|
+
/**
|
|
85
|
+
* Gets the identifier from one stored record.
|
|
86
|
+
* @param record The stored record.
|
|
87
|
+
* @returns The logical record identifier.
|
|
88
|
+
*/
|
|
89
|
+
idValueIn(record: R): I;
|
|
90
|
+
/**
|
|
91
|
+
* Creates materialized record values with cloned identifiers and columns.
|
|
92
|
+
* @param record The record to materialize.
|
|
93
|
+
* @returns The materialized record values.
|
|
94
|
+
*/
|
|
95
|
+
materialize(record: R): {
|
|
96
|
+
readonly columns: ReadonlyMap<string, unknown>;
|
|
97
|
+
readonly id: I;
|
|
98
|
+
readonly record: R;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=record-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-spec.d.ts","sourceRoot":"","sources":["../../src/record/record-spec.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAMlD;;GAEG;AAEH,MAAM,MAAM,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,IAAI;IAEpD;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAEnC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;CAC/C,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GACtB;IAEE;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;CACzB,GACD;IACE,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC,CAAC;AAOP;;GAEG;AACH,qBAAa,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO;;IAQ1C;;;;;OAKG;gBACS,KAAK,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;IA8B1C;;;OAGG;IACH,IAAI,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,CAEpC;IAED;;;OAGG;IACH,IAAI,MAAM,IAAI,CAAC,SAAS,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,CAEvD;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,UAAU,CAAC,CAAC,CAAC,CAE9B;IAED;;;OAGG;IACH,IAAI,OAAO,IAAI,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,CAExC;IAED;;;;OAIG;IACH,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC;IAMjB;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC;IAIzB;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC;IAIvB;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG;QACtB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/C,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;QACf,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;KACpB;CAeF"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, CodeMatters. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
5
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
10
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
11
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
12
|
+
* the License.
|
|
13
|
+
*/
|
|
14
|
+
import { clone } from "@bufbuild/protobuf";
|
|
15
|
+
import { RecordColumn } from "./record-column.js";
|
|
16
|
+
const storageHost = globalThis;
|
|
17
|
+
/**
|
|
18
|
+
* Declarative specification for one identified Protobuf record type.
|
|
19
|
+
*/
|
|
20
|
+
export class RecordSpec {
|
|
21
|
+
#columns;
|
|
22
|
+
#extractId;
|
|
23
|
+
#idSchema;
|
|
24
|
+
#idKind;
|
|
25
|
+
#recordType;
|
|
26
|
+
#sourceType;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a record specification.
|
|
29
|
+
*
|
|
30
|
+
* @throws Error if the ID type is invalid or two declared columns have the same name.
|
|
31
|
+
* @param input The source, record, identity, and column definitions.
|
|
32
|
+
*/
|
|
33
|
+
constructor(input) {
|
|
34
|
+
const runtimeInput = input;
|
|
35
|
+
this.#columns = input.columns ?? [];
|
|
36
|
+
const names = new Set();
|
|
37
|
+
for (const column of this.#columns) {
|
|
38
|
+
if (names.has(column.name)) {
|
|
39
|
+
throw new Error(`Storage record specification has duplicate record column "${column.name}".`);
|
|
40
|
+
}
|
|
41
|
+
names.add(column.name);
|
|
42
|
+
}
|
|
43
|
+
this.#extractId = input.extractId;
|
|
44
|
+
if (runtimeInput.idSchema === undefined &&
|
|
45
|
+
(runtimeInput.idKind === undefined || runtimeInput.idKind.trim().length === 0)) {
|
|
46
|
+
throw new Error("Storage record specification requires a non-blank primitive ID kind.");
|
|
47
|
+
}
|
|
48
|
+
if (runtimeInput.idSchema !== undefined && runtimeInput.idKind !== undefined) {
|
|
49
|
+
throw new Error("Storage record specification must not declare both an ID schema and primitive ID kind.");
|
|
50
|
+
}
|
|
51
|
+
this.#idSchema = input.idSchema;
|
|
52
|
+
this.#idKind = input.idKind ?? "";
|
|
53
|
+
this.#recordType = input.recordType;
|
|
54
|
+
this.#sourceType = input.sourceType ?? input.recordType;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns the original message type represented by these records.
|
|
58
|
+
* @returns The source message type.
|
|
59
|
+
*/
|
|
60
|
+
get sourceType() {
|
|
61
|
+
return this.#sourceType;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Returns the type used to identify stored records.
|
|
65
|
+
* @returns The message ID type or primitive ID kind.
|
|
66
|
+
*/
|
|
67
|
+
get idType() {
|
|
68
|
+
return (this.#idSchema ?? this.#idKind);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns the Protobuf record type stored by this specification.
|
|
72
|
+
* @returns The managed record type.
|
|
73
|
+
*/
|
|
74
|
+
get recordType() {
|
|
75
|
+
return this.#recordType;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Returns the columns materialized from stored records.
|
|
79
|
+
* @returns The declared record columns.
|
|
80
|
+
*/
|
|
81
|
+
get columns() {
|
|
82
|
+
return this.#columns;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Copies an ID value according to this specification.
|
|
86
|
+
* @param id The ID to clone.
|
|
87
|
+
* @returns The cloned ID.
|
|
88
|
+
*/
|
|
89
|
+
cloneId(id) {
|
|
90
|
+
const idSchema = this.#idSchema;
|
|
91
|
+
return idSchema === undefined ? RecordCloner.value(id) : RecordCloner.message(idSchema, id);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Copies one record value according to this specification.
|
|
95
|
+
* @param record The record to clone.
|
|
96
|
+
* @returns The cloned record.
|
|
97
|
+
*/
|
|
98
|
+
cloneRecord(record) {
|
|
99
|
+
return RecordCloner.message(this.#recordType, record);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Gets the identifier from one stored record.
|
|
103
|
+
* @param record The stored record.
|
|
104
|
+
* @returns The logical record identifier.
|
|
105
|
+
*/
|
|
106
|
+
idValueIn(record) {
|
|
107
|
+
return this.#extractId(record);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Creates materialized record values with cloned identifiers and columns.
|
|
111
|
+
* @param record The record to materialize.
|
|
112
|
+
* @returns The materialized record values.
|
|
113
|
+
*/
|
|
114
|
+
materialize(record) {
|
|
115
|
+
const storedRecord = this.cloneRecord(record);
|
|
116
|
+
const id = this.cloneId(this.idValueIn(storedRecord));
|
|
117
|
+
return {
|
|
118
|
+
id,
|
|
119
|
+
record: storedRecord,
|
|
120
|
+
columns: new Map(this.#columns.map((column) => [
|
|
121
|
+
column.name,
|
|
122
|
+
RecordCloner.value(column.valueIn(storedRecord)),
|
|
123
|
+
])),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const RecordCloner = Object.freeze({
|
|
128
|
+
message(schema, record) {
|
|
129
|
+
const cloneMethod = this.findCloneMethod(record);
|
|
130
|
+
if (cloneMethod !== undefined) {
|
|
131
|
+
return Reflect.apply(cloneMethod, record, []);
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
return clone(schema, record);
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
throw new Error("Storage record could not be cloned.");
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
value(value) {
|
|
141
|
+
const cloneMethod = this.findCloneMethod(value);
|
|
142
|
+
if (cloneMethod !== undefined) {
|
|
143
|
+
return Reflect.apply(cloneMethod, value, []);
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
return storageHost.structuredClone(value);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
throw new Error("Storage value could not be cloned.");
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
findCloneMethod(value) {
|
|
153
|
+
if (typeof value !== "object" || value === null)
|
|
154
|
+
return undefined;
|
|
155
|
+
const candidate = Reflect.get(value, "clone");
|
|
156
|
+
return typeof candidate === "function" ? candidate : undefined;
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
//# sourceMappingURL=record-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-spec.js","sourceRoot":"","sources":["../../src/record/record-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,WAAW,GAAG,UAEnB,CAAC;AAqDF;;GAEG;AACH,MAAM,OAAO,UAAU;IACZ,QAAQ,CAA6B;IACrC,UAAU,CAAmB;IAC7B,SAAS,CAA8D;IACvE,OAAO,CAAS;IAChB,WAAW,CAAgB;IAC3B,WAAW,CAAsB;IAE1C;;;;;OAKG;IACH,YAAY,KAA8B;QACxC,MAAM,YAAY,GAAG,KAA+B,CAAC;QACrD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;QAChC,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnC,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC3B,MAAM,IAAI,KAAK,CACb,6DAA6D,MAAM,CAAC,IAAI,IAAI,CAC7E,CAAC;YACJ,CAAC;YACD,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC;QAClC,IACE,YAAY,CAAC,QAAQ,KAAK,SAAS;YACnC,CAAC,YAAY,CAAC,MAAM,KAAK,SAAS,IAAI,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KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CAAM,CAAC;QACpD,CAAC;QAED,IAAI,CAAC;YACH,OAAO,WAAW,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAC5C,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,eAAe,CAAC,KAAc;QAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,SAAS,CAAC;QAClE,MAAM,SAAS,GAAY,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACvD,OAAO,OAAO,SAAS,KAAK,UAAU,CAAC,CAAC,CAAE,SAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
2
|
+
import { RecordQuery } from "./record-query.js";
|
|
3
|
+
import type { RecordReadOptions } from "./record-query.js";
|
|
4
|
+
import type { RecordSpec } from "./record-spec.js";
|
|
5
|
+
import type { Storage, StorageContext } from "../storage/storage.js";
|
|
6
|
+
import type { NormalizedQueryPlan, StorageQueryCapabilities } from "../query/query-policy.js";
|
|
7
|
+
/**
|
|
8
|
+
* Common record-oriented storage contract for identified Protobuf messages.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class RecordStorage<I, R extends Message> implements Storage {
|
|
11
|
+
#private;
|
|
12
|
+
/**
|
|
13
|
+
* Declares whether this handle provides atomic compare-and-set mutations.
|
|
14
|
+
*
|
|
15
|
+
* The base contract defaults to `false`. An adapter sets this to `true` only
|
|
16
|
+
* when its `compareAndSet()` implementation is atomic across compatible
|
|
17
|
+
* handles. Registry and delivery code must reject a handle that leaves this
|
|
18
|
+
* capability disabled rather than treating a failed conditional write as a
|
|
19
|
+
* collision.
|
|
20
|
+
*/
|
|
21
|
+
readonly atomicCompareAndSet: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Creates storage for one context and record specification.
|
|
24
|
+
* @param context The storage and tenant context.
|
|
25
|
+
* @param recordSpec The records managed by this storage.
|
|
26
|
+
*/
|
|
27
|
+
constructor(context: StorageContext, recordSpec: RecordSpec<I, R>);
|
|
28
|
+
/**
|
|
29
|
+
* Returns the context that scopes this storage and its tenant slices.
|
|
30
|
+
* @returns The storage context.
|
|
31
|
+
*/
|
|
32
|
+
protected get context(): StorageContext;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the declarative record specification for this storage.
|
|
35
|
+
* @returns The managed record specification.
|
|
36
|
+
*/
|
|
37
|
+
get recordSpec(): RecordSpec<I, R>;
|
|
38
|
+
/**
|
|
39
|
+
* Closes this record storage. Future operations fail.
|
|
40
|
+
*/
|
|
41
|
+
close(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Returns whether this record storage still accepts operations.
|
|
44
|
+
* @returns Whether the storage is open.
|
|
45
|
+
*/
|
|
46
|
+
isOpen(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Deletes one stored record by actual storage slot ID.
|
|
49
|
+
* @param id The storage slot identifier.
|
|
50
|
+
* @returns Whether a record was deleted.
|
|
51
|
+
*/
|
|
52
|
+
delete(id: I): Promise<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* Reads one record by actual storage slot ID, optionally applying a mask.
|
|
55
|
+
* @param id The storage slot identifier.
|
|
56
|
+
* @param options The read options.
|
|
57
|
+
* @returns The matching record, if present.
|
|
58
|
+
*/
|
|
59
|
+
read(id: I, options?: RecordReadOptions): Promise<R | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* Reads matching logical record identifiers derived from stored record bodies
|
|
62
|
+
* in deterministic query order.
|
|
63
|
+
* @param query The record query.
|
|
64
|
+
* @returns The matching logical identifiers.
|
|
65
|
+
*/
|
|
66
|
+
index(query?: RecordQuery<I>): Promise<readonly I[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Processes records by actual storage slot IDs, columns, sorting,
|
|
69
|
+
* continuations, limits, and optional masks.
|
|
70
|
+
*
|
|
71
|
+
* `RecordQuery.ids`, when present, filters storage slot IDs rather than
|
|
72
|
+
* logical IDs derived from record bodies.
|
|
73
|
+
* @param query The record query.
|
|
74
|
+
* @returns The matching records.
|
|
75
|
+
*/
|
|
76
|
+
query(query?: RecordQuery<I>): Promise<readonly R[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Processes stored records together with the actual storage slot IDs they
|
|
79
|
+
* currently occupy in the requested sorted and continued order.
|
|
80
|
+
*
|
|
81
|
+
* `RecordQuery.ids`, when present, filters those storage slot IDs rather
|
|
82
|
+
* than logical IDs derived from record bodies.
|
|
83
|
+
* @param query The record query.
|
|
84
|
+
* @returns The matching storage entries.
|
|
85
|
+
*/
|
|
86
|
+
queryEntries(query?: RecordQuery<I>): Promise<readonly RecordEntry<I, R>[]>;
|
|
87
|
+
/**
|
|
88
|
+
* Executes one provider-independent normalized query plan.
|
|
89
|
+
* @param plan The validated normalized plan.
|
|
90
|
+
* @returns The matching records.
|
|
91
|
+
*/
|
|
92
|
+
queryPlan(plan: NormalizedQueryPlan<I>): Promise<readonly R[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Executes a normalized plan and retains actual storage slot IDs.
|
|
95
|
+
* @param plan The validated normalized plan.
|
|
96
|
+
* @returns The matching storage entries.
|
|
97
|
+
*/
|
|
98
|
+
queryPlanEntries(plan: NormalizedQueryPlan<I>): Promise<readonly RecordEntry<I, R>[]>;
|
|
99
|
+
/**
|
|
100
|
+
* Writes one record, replacing any previous value with the same ID.
|
|
101
|
+
* @param record The record to write.
|
|
102
|
+
* @returns Completes when the record is written.
|
|
103
|
+
*/
|
|
104
|
+
write(record: R): Promise<void>;
|
|
105
|
+
/**
|
|
106
|
+
* Compares the current stored record for one ID with an expected value and
|
|
107
|
+
* write or delete only when they still match.
|
|
108
|
+
*
|
|
109
|
+
* Implementations must apply this atomically across independently opened
|
|
110
|
+
* storage handles that share the same logical backing store. Passing
|
|
111
|
+
* `undefined` as `next` performs a conditional delete. A `false` result means
|
|
112
|
+
* the current stored value did not match `expected`, so no mutation was
|
|
113
|
+
* applied. The `id` argument names an actual storage slot, not a logical ID
|
|
114
|
+
* derived from a record body. Adapters that cannot guarantee this behavior
|
|
115
|
+
* are not valid for delivery leasing or deduplication.
|
|
116
|
+
* @param id The storage slot identifier.
|
|
117
|
+
* @param expected The expected current record.
|
|
118
|
+
* @param next The record to write, or undefined to delete.
|
|
119
|
+
* @returns Whether the conditional mutation was applied.
|
|
120
|
+
*/
|
|
121
|
+
compareAndSet(id: I, expected: R | undefined, next: R | undefined): Promise<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* Writes records in order, materializing all values before persistence.
|
|
124
|
+
* @param records The records to write.
|
|
125
|
+
* @returns Completes when the records are written.
|
|
126
|
+
*/
|
|
127
|
+
writeAll(records: Iterable<R>): Promise<void>;
|
|
128
|
+
/**
|
|
129
|
+
* Deletes the record at one storage slot.
|
|
130
|
+
* @param id The storage slot identifier.
|
|
131
|
+
* @returns Whether a record was deleted.
|
|
132
|
+
*/
|
|
133
|
+
protected abstract deleteRecord(id: I): Promise<boolean>;
|
|
134
|
+
/**
|
|
135
|
+
* Returns stored records together with their actual storage slot IDs.
|
|
136
|
+
*
|
|
137
|
+
* Implementations must return `RecordEntry.id` as the concrete storage slot
|
|
138
|
+
* identifier for the row or document that currently stores the record.
|
|
139
|
+
* `RecordStorage.index()` derives logical record identifiers from
|
|
140
|
+
* `RecordEntry.record`, so adapters must not substitute logical IDs into
|
|
141
|
+
* `RecordEntry.id` here.
|
|
142
|
+
* @param query The record query.
|
|
143
|
+
* @returns The matching storage entries.
|
|
144
|
+
*/
|
|
145
|
+
protected abstract queryRecordEntries(query: RecordQuery<I>): Promise<readonly RecordEntry<I, R>[]>;
|
|
146
|
+
/**
|
|
147
|
+
* Returns logical normalized features admitted before provider access.
|
|
148
|
+
* @returns The supported query capabilities.
|
|
149
|
+
*/
|
|
150
|
+
protected queryCapabilities(): StorageQueryCapabilities;
|
|
151
|
+
/**
|
|
152
|
+
* Returns provider candidates for a normalized plan; shared evaluation applies the complete plan afterward.
|
|
153
|
+
* @param plan The normalized query plan.
|
|
154
|
+
* @returns The candidate storage entries.
|
|
155
|
+
*/
|
|
156
|
+
protected queryPlanRecordEntries(plan: NormalizedQueryPlan<I>): Promise<readonly RecordEntry<I, R>[]>;
|
|
157
|
+
/**
|
|
158
|
+
* Reads the record at one storage slot.
|
|
159
|
+
* @param id The storage slot identifier.
|
|
160
|
+
* @returns The stored record, if present.
|
|
161
|
+
*/
|
|
162
|
+
protected abstract readRecord(id: I): Promise<R | undefined>;
|
|
163
|
+
/**
|
|
164
|
+
* Compares and conditionally replaces the record at one storage slot.
|
|
165
|
+
* @param id The storage slot identifier.
|
|
166
|
+
* @param expected The expected materialized record.
|
|
167
|
+
* @param next The replacement materialized record, if any.
|
|
168
|
+
* @returns Whether the conditional mutation was applied.
|
|
169
|
+
*/
|
|
170
|
+
protected abstract compareAndSetRecord(id: I, expected: ReturnType<RecordSpec<I, R>["materialize"]> | undefined, next: ReturnType<RecordSpec<I, R>["materialize"]> | undefined): Promise<boolean>;
|
|
171
|
+
/**
|
|
172
|
+
* Writes materialized records.
|
|
173
|
+
* @param records The materialized records to write.
|
|
174
|
+
* @returns Completes when the records are written.
|
|
175
|
+
*/
|
|
176
|
+
protected abstract writeAllRecords(records: readonly ReturnType<RecordSpec<I, R>["materialize"]>[]): Promise<void>;
|
|
177
|
+
/**
|
|
178
|
+
* Writes one materialized record.
|
|
179
|
+
* @param record The materialized record to write.
|
|
180
|
+
* @returns Completes when the record is written.
|
|
181
|
+
*/
|
|
182
|
+
protected abstract writeRecord(record: ReturnType<RecordSpec<I, R>["materialize"]>): Promise<void>;
|
|
183
|
+
private requireOpen;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* One queried storage row or document.
|
|
187
|
+
*
|
|
188
|
+
* `id` is the actual storage slot identifier. `record` is the stored record
|
|
189
|
+
* value whose logical identifier may differ and is derived through
|
|
190
|
+
* `RecordSpec.idValueIn(...)`.
|
|
191
|
+
*/
|
|
192
|
+
export interface RecordEntry<I, R extends Message> {
|
|
193
|
+
/**
|
|
194
|
+
* Identifies the actual storage slot.
|
|
195
|
+
*/
|
|
196
|
+
readonly id: I;
|
|
197
|
+
/**
|
|
198
|
+
* Holds the stored record value.
|
|
199
|
+
*/
|
|
200
|
+
readonly record: R;
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=record-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-storage.d.ts","sourceRoot":"","sources":["../../src/record/record-storage.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAOrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAE9F;;GAEG;AACH,8BAAsB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,CAAE,YAAW,OAAO;;IAG1E;;;;;;;;OAQG;IACH,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAS;IAK9C;;;;OAIG;gBACS,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;IAKjE;;;OAGG;IACH,SAAS,KAAK,OAAO,IAAI,cAAc,CAEtC;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,UAA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