@effect-dynamodb/schema 1.36.1 → 1.37.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/Aggregate.d.ts +19 -11
- package/dist/Aggregate.d.ts.map +1 -1
- package/dist/Aggregate.js.map +1 -1
- package/dist/DynamoModel.d.ts +9 -1
- package/dist/DynamoModel.d.ts.map +1 -1
- package/dist/DynamoModel.js.map +1 -1
- package/dist/DynamoSchema.d.ts +20 -0
- package/dist/DynamoSchema.d.ts.map +1 -1
- package/dist/DynamoSchema.js +14 -0
- package/dist/DynamoSchema.js.map +1 -1
- package/dist/Entity.d.ts +153 -21
- package/dist/Entity.d.ts.map +1 -1
- package/dist/Entity.js +102 -2
- package/dist/Entity.js.map +1 -1
- package/dist/Errors.d.ts +27 -0
- package/dist/Errors.d.ts.map +1 -1
- package/dist/Errors.js +24 -0
- package/dist/Errors.js.map +1 -1
- package/dist/KeyComposer.d.ts +165 -27
- package/dist/KeyComposer.d.ts.map +1 -1
- package/dist/KeyComposer.js +251 -22
- package/dist/KeyComposer.js.map +1 -1
- package/dist/ZOrder.d.ts +173 -0
- package/dist/ZOrder.d.ts.map +1 -0
- package/dist/ZOrder.js +39 -0
- package/dist/ZOrder.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/AggregateEdges.d.ts +81 -12
- package/dist/internal/AggregateEdges.d.ts.map +1 -1
- package/dist/internal/AggregateEdges.js +17 -21
- package/dist/internal/AggregateEdges.js.map +1 -1
- package/dist/internal/AggregateTypes.d.ts +51 -2
- package/dist/internal/AggregateTypes.d.ts.map +1 -1
- package/dist/internal/CompositeCodec.d.ts +27 -12
- package/dist/internal/CompositeCodec.d.ts.map +1 -1
- package/dist/internal/CompositeCodec.js +93 -23
- package/dist/internal/CompositeCodec.js.map +1 -1
- package/dist/internal/EntityConfig.d.ts +12 -9
- package/dist/internal/EntityConfig.d.ts.map +1 -1
- package/dist/internal/EntityTypes.d.ts +77 -2
- package/dist/internal/EntityTypes.d.ts.map +1 -1
- package/dist/internal/KeyText136.d.ts +153 -0
- package/dist/internal/KeyText136.d.ts.map +1 -0
- package/dist/internal/KeyText136.js +357 -0
- package/dist/internal/KeyText136.js.map +1 -0
- package/dist/internal/NumericKey.d.ts +71 -0
- package/dist/internal/NumericKey.d.ts.map +1 -0
- package/dist/internal/NumericKey.js +128 -0
- package/dist/internal/NumericKey.js.map +1 -0
- package/dist/internal/SchemaAccessors.d.ts +6 -5
- package/dist/internal/SchemaAccessors.d.ts.map +1 -1
- package/dist/internal/SchemaAccessors.js +6 -5
- package/dist/internal/SchemaAccessors.js.map +1 -1
- package/dist/internal/ZOrderCurve.d.ts +256 -0
- package/dist/internal/ZOrderCurve.d.ts.map +1 -0
- package/dist/internal/ZOrderCurve.js +630 -0
- package/dist/internal/ZOrderCurve.js.map +1 -0
- package/dist/internal/ZOrderDimension.d.ts +70 -0
- package/dist/internal/ZOrderDimension.d.ts.map +1 -0
- package/dist/internal/ZOrderDimension.js +283 -0
- package/dist/internal/ZOrderDimension.js.map +1 -0
- package/package.json +1 -1
package/dist/KeyComposer.d.ts
CHANGED
|
@@ -7,22 +7,84 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type * as DynamoSchema from "./DynamoSchema.js";
|
|
9
9
|
import type { CompositeKeyHoleError } from "./Errors.js";
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
import { type Layout } from "./internal/ZOrderCurve.js";
|
|
11
|
+
import { type DeclaredDimension } from "./internal/ZOrderDimension.js";
|
|
12
|
+
import type * as ZOrder from "./ZOrder.js";
|
|
13
|
+
/**
|
|
14
|
+
* Index key part definition (pk or sk of an index). `field` is the physical
|
|
15
|
+
* key attribute; `composite` names the model attributes composed into it —
|
|
16
|
+
* `F`, on `Entity.make`, is the model's field names (plus ref-derived ids), so
|
|
17
|
+
* a misspelled one is a compile error. `zorder` / `prefix` belong to a Z-order
|
|
18
|
+
* sort key ({@link ZOrderKeyPart}) and are a type error here — on a partition
|
|
19
|
+
* key half or on the primary key.
|
|
20
|
+
*/
|
|
21
|
+
export interface KeyPart<F extends string = string> {
|
|
22
|
+
readonly field: string;
|
|
23
|
+
readonly composite: ReadonlyArray<F>;
|
|
24
|
+
readonly zorder?: never;
|
|
25
|
+
readonly prefix?: never;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A Z-order sort key, as declared on a secondary index (#171): the bits of the
|
|
29
|
+
* `zorder` dimensions interleaved into one binary (`B`) value, behind the
|
|
30
|
+
* exact-match `prefix` composites. It has no `composite`: the fields that feed
|
|
31
|
+
* it are the prefix composites and the dimensions' fields. `TFields` is the
|
|
32
|
+
* model's fields (name → type) on `Entity.make`, which types each prefix
|
|
33
|
+
* composite and each dimension entry from the field it names.
|
|
34
|
+
*/
|
|
35
|
+
export interface ZOrderKeyPart<TFields = globalThis.Record<string, unknown>> {
|
|
36
|
+
/** Physical attribute name, stored as `B`. */
|
|
37
|
+
readonly field: string;
|
|
38
|
+
/** Exact-match composites, in front of the address. */
|
|
39
|
+
readonly prefix?: ReadonlyArray<ZOrder.PrefixPart<keyof TFields & string>>;
|
|
40
|
+
/** The interleaved dimensions; declaration order is interleave priority. */
|
|
41
|
+
readonly zorder: ReadonlyArray<ZOrder.Dimension<TFields>>;
|
|
42
|
+
readonly composite?: never;
|
|
43
|
+
}
|
|
44
|
+
/** One normalised prefix composite: its field, and its hash width when hashed. */
|
|
45
|
+
export interface ZOrderPrefixSegment {
|
|
46
|
+
readonly field: string;
|
|
47
|
+
readonly hash: number | undefined;
|
|
48
|
+
}
|
|
49
|
+
/** The Z-order specifics of a normalised sort key half. */
|
|
50
|
+
export interface ZOrderHalf {
|
|
51
|
+
readonly prefix: ReadonlyArray<ZOrderPrefixSegment>;
|
|
52
|
+
/** The dimensions as declared (options checked), in interleave order. */
|
|
53
|
+
readonly dimensions: ReadonlyArray<DeclaredDimension>;
|
|
54
|
+
/**
|
|
55
|
+
* The dimensions bound to the entity's fields (internal). `undefined` on the
|
|
56
|
+
* half `normalizeGsiConfig` returns, until `Entity.make` binds it.
|
|
57
|
+
*/
|
|
58
|
+
readonly layout: Layout | undefined;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A normalised Z-order sort key half. Built only by `normalizeGsiConfig` and
|
|
62
|
+
* bound by `Entity.make`. `composite` is derived — the prefix composites, then
|
|
63
|
+
* the dimensions' fields — so every check that reads "the fields feeding this
|
|
64
|
+
* key" covers it; only the sites that string-compose a key branch on
|
|
65
|
+
* {@link isZOrderHalf}.
|
|
66
|
+
*/
|
|
67
|
+
export interface ZOrderSkPart {
|
|
12
68
|
readonly field: string;
|
|
13
69
|
readonly composite: ReadonlyArray<string>;
|
|
70
|
+
readonly zorderHalf: ZOrderHalf;
|
|
14
71
|
}
|
|
72
|
+
/** Is this sort key half a Z-order one? */
|
|
73
|
+
export declare const isZOrderHalf: (part: KeyPart | ZOrderSkPart) => part is ZOrderSkPart;
|
|
74
|
+
/** A composed key value: text for a string half, bytes for a Z-order half. */
|
|
75
|
+
export type KeyValue = string | Uint8Array;
|
|
15
76
|
/**
|
|
16
77
|
* Per-half policy value controlling how `Entity.update` and time-series
|
|
17
78
|
* `.append` handle a GSI half the writer touches but can't compose.
|
|
18
79
|
*
|
|
19
|
-
* Per-half evaluation gate (v1.7.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
80
|
+
* Per-half evaluation gate (v1.7.3 skip-predicate): a half is *skipped* — no
|
|
81
|
+
* SET, no REMOVE, no policy fires — iff it has composites, none of them is in
|
|
82
|
+
* `Entity.remove([...])`, and every one is absent from both the update payload
|
|
83
|
+
* and the key record. Every other half is *evaluated*.
|
|
23
84
|
*
|
|
24
|
-
* For
|
|
25
|
-
* rule can't compose (empty leading prefix OR hole pattern
|
|
85
|
+
* For evaluated halves the policy decides the outcome when the structural
|
|
86
|
+
* rule can't compose (empty leading prefix OR hole pattern; for a Z-order
|
|
87
|
+
* half, any prefix composite or dimension absent — it never truncates):
|
|
26
88
|
* - `"sparse"` — REMOVE this half's key attribute (the half drops out of the
|
|
27
89
|
* GSI). The other half follows its own per-half outcome independently —
|
|
28
90
|
* there is no GSI-wide cascade. The DDB projection rule means an item with
|
|
@@ -60,7 +122,7 @@ export interface IndexDefinition {
|
|
|
60
122
|
readonly collection?: string | ReadonlyArray<string>;
|
|
61
123
|
readonly type?: "isolated" | "clustered" | undefined;
|
|
62
124
|
readonly pk: KeyPart;
|
|
63
|
-
readonly sk: KeyPart;
|
|
125
|
+
readonly sk: KeyPart | ZOrderSkPart;
|
|
64
126
|
/** Key casing override; see {@link GsiConfig.casing}. Defaults to the schema's. */
|
|
65
127
|
readonly casing?: DynamoSchema.Casing;
|
|
66
128
|
/**
|
|
@@ -71,8 +133,10 @@ export interface IndexDefinition {
|
|
|
71
133
|
readonly indexPolicy?: IndexPolicy;
|
|
72
134
|
}
|
|
73
135
|
/** GSI definition as specified on Entity.make() indexes config.
|
|
74
|
-
* Mirrors the primaryKey structure with an added `name` for the physical GSI.
|
|
75
|
-
|
|
136
|
+
* Mirrors the primaryKey structure with an added `name` for the physical GSI.
|
|
137
|
+
* `TFields` is the model's fields (name → type) on `Entity.make`: composites,
|
|
138
|
+
* prefix composites and dimensions are typed from it. */
|
|
139
|
+
export interface GsiConfig<TFields = globalThis.Record<string, unknown>> {
|
|
76
140
|
/** Physical GSI name (e.g., `"gsi1"`). */
|
|
77
141
|
readonly name: string;
|
|
78
142
|
/** Optional collection name. String for single, array for sub-collections. */
|
|
@@ -80,9 +144,12 @@ export interface GsiConfig {
|
|
|
80
144
|
/** SK ordering mode. `"isolated"` (default) puts entity type before composites; `"clustered"` puts entity type after composites (required for sub-collections). */
|
|
81
145
|
readonly type?: "isolated" | "clustered";
|
|
82
146
|
/** Partition key: physical field name + composite attributes. */
|
|
83
|
-
readonly pk: KeyPart
|
|
84
|
-
/**
|
|
85
|
-
|
|
147
|
+
readonly pk: KeyPart<keyof TFields & string>;
|
|
148
|
+
/**
|
|
149
|
+
* Sort key: physical field name + composite attributes — or a Z-order key
|
|
150
|
+
* (`zorder`, optional `prefix`; see {@link ZOrderKeyPart}).
|
|
151
|
+
*/
|
|
152
|
+
readonly sk: KeyPart<keyof TFields & string> | ZOrderKeyPart<TFields>;
|
|
86
153
|
/**
|
|
87
154
|
* Key casing for this index, overriding the schema's `casing`. Applies to the
|
|
88
155
|
* entity type / collection name and the composite names and values in both
|
|
@@ -127,9 +194,15 @@ export declare const tryExtractComposites: (composite: ReadonlyArray<string>, re
|
|
|
127
194
|
/**
|
|
128
195
|
* Serialize a value for use in a composite key.
|
|
129
196
|
*
|
|
130
|
-
* Numeric values are
|
|
131
|
-
*
|
|
132
|
-
* -
|
|
197
|
+
* Numeric values are encoded so their key text sorts in numeric order
|
|
198
|
+
* (`internal/NumericKey.ts` has the format):
|
|
199
|
+
* - number → a non-negative integer below 1e16 (or `-0`) is zero-padded to 16
|
|
200
|
+
* digits, as up to 1.36; negatives, fractions, larger values and ±Infinity
|
|
201
|
+
* take the order-preserving forms (`-3.14` → `-9999999999999996.85:`)
|
|
202
|
+
* - bigint → the same, zero-padded to 38 digits below 1e38
|
|
203
|
+
*
|
|
204
|
+
* Throws `[EDD-9096]` (`KeyValueError`) for `NaN`, which has no order, and for
|
|
205
|
+
* a bigint of more than 1,000 digits.
|
|
133
206
|
*
|
|
134
207
|
* DateTime values are formatted as ISO strings for correct sort order:
|
|
135
208
|
* - DateTime.Zoned → ISO string with offset (preserves timezone info)
|
|
@@ -137,6 +210,27 @@ export declare const tryExtractComposites: (composite: ReadonlyArray<string>, re
|
|
|
137
210
|
* - Date → ISO string
|
|
138
211
|
*/
|
|
139
212
|
export declare const serializeValue: (value: unknown) => string;
|
|
213
|
+
/**
|
|
214
|
+
* A composite value's serialized text as a sort key holds it (#171): cased,
|
|
215
|
+
* then each code point U+0000–U+0025 — control characters, space, `!`, `"`,
|
|
216
|
+
* `#`, `$` and `%` — escaped as `%` and two hex digits (space → `%20`, `#` →
|
|
217
|
+
* `%23`, `%` → `%25`), the hex digits in upper case, or lower case under
|
|
218
|
+
* `"lowercase"` casing. Any other text is unchanged, so a value without such a
|
|
219
|
+
* character keeps its 1.36 key text.
|
|
220
|
+
*
|
|
221
|
+
* Every escaped value sorts as its cased value and starts with its cased
|
|
222
|
+
* prefixes' text: an unescaped character sorts above `%`, and an escape starts
|
|
223
|
+
* with `%` and keeps the order of the code points it replaces. A composite's
|
|
224
|
+
* text followed by the key delimiter (`#`, below `%`) therefore sorts before
|
|
225
|
+
* every key of a greater value — `new#…` before `new%20york#…` and
|
|
226
|
+
* `new%21#…` — and a bound on any composite is one exact key range.
|
|
227
|
+
*
|
|
228
|
+
* Casing comes first so the hex digits are the only text it can't reach: the
|
|
229
|
+
* composer cases the key again, which leaves cased text as it is.
|
|
230
|
+
*/
|
|
231
|
+
export declare const sortKeyText: (text: string, casing: DynamoSchema.Casing) => string;
|
|
232
|
+
/** A composite value's text in a sort key: {@link serializeValue}, then {@link sortKeyText}. */
|
|
233
|
+
export declare const serializeSortKeyValue: (value: unknown, casing: DynamoSchema.Casing) => string;
|
|
140
234
|
/**
|
|
141
235
|
* Compose a partition key for an entity index.
|
|
142
236
|
*
|
|
@@ -152,6 +246,21 @@ export declare const composePk: (schema: DynamoSchema.DynamoSchema, entityType:
|
|
|
152
246
|
* For non-collection indexes: `$schema#v<version>#entityType#attr1#attr2`
|
|
153
247
|
*/
|
|
154
248
|
export declare const composeSk: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, index: IndexDefinition, record: Record<string, unknown>) => string;
|
|
249
|
+
/**
|
|
250
|
+
* Compose the bytes of a Z-order sort key half from a key-form record:
|
|
251
|
+
*
|
|
252
|
+
* ```
|
|
253
|
+
* seg(prefix_1) ‖ … ‖ seg(prefix_k) ‖ toBytes(interleave(q(dim_1), …, q(dim_m)), W)
|
|
254
|
+
* ```
|
|
255
|
+
*
|
|
256
|
+
* No schema prefix, no entity type, no version byte: the partition key keeps
|
|
257
|
+
* entities apart. Prefix values are cased like any composite (the index's
|
|
258
|
+
* effective casing). Throws `[EDD-9092]` (`ZOrderValueError`) for a value a
|
|
259
|
+
* dimension can't quantize; the record must carry every field.
|
|
260
|
+
*/
|
|
261
|
+
export declare const composeZOrderSk: (schema: DynamoSchema.DynamoSchema, index: IndexDefinition, record: Record<string, unknown>) => Uint8Array;
|
|
262
|
+
/** {@link composeSk} for a string half, {@link composeZOrderSk} for a Z-order half. */
|
|
263
|
+
export declare const composeSkValue: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, index: IndexDefinition, record: Record<string, unknown>) => KeyValue;
|
|
155
264
|
/**
|
|
156
265
|
* The item segment of an entity's history keys (version snapshots and
|
|
157
266
|
* soft-delete tombstones): the composite part of the item's primary sort key,
|
|
@@ -165,17 +274,22 @@ export declare const composeHistoryItemSegment: (schema: DynamoSchema.DynamoSche
|
|
|
165
274
|
* Compose all key attributes for a single index.
|
|
166
275
|
* Returns a record mapping field names to composed key values.
|
|
167
276
|
*/
|
|
168
|
-
export declare const composeIndexKeys: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, index: IndexDefinition, record: Record<string, unknown>) => Record<string,
|
|
277
|
+
export declare const composeIndexKeys: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, index: IndexDefinition, record: Record<string, unknown>) => Record<string, KeyValue>;
|
|
169
278
|
/**
|
|
170
279
|
* Non-throwing variant of composeIndexKeys. Returns undefined if any composite
|
|
171
280
|
* attribute is missing. Used for sparse GSI support.
|
|
281
|
+
*
|
|
282
|
+
* The presence check reads values without serializing them: a present value
|
|
283
|
+
* that has no key text (`NaN`, `[EDD-9096]`) or no Z-order level
|
|
284
|
+
* (`[EDD-9092]`) must reach the composer that refuses it, not be serialized
|
|
285
|
+
* as text first — a Z-order half's `composite` lists its dimension fields.
|
|
172
286
|
*/
|
|
173
|
-
export declare const tryComposeIndexKeys: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, index: IndexDefinition, record: Record<string, unknown>) => Record<string,
|
|
287
|
+
export declare const tryComposeIndexKeys: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, index: IndexDefinition, record: Record<string, unknown>) => Record<string, KeyValue> | undefined;
|
|
174
288
|
/**
|
|
175
289
|
* Compose keys for all indexes of an entity.
|
|
176
290
|
* Returns a flat record of all key field -> value mappings.
|
|
177
291
|
*/
|
|
178
|
-
export declare const composeAllKeys: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, indexes: Record<string, IndexDefinition>, record: Record<string, unknown>) => Record<string,
|
|
292
|
+
export declare const composeAllKeys: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, indexes: Record<string, IndexDefinition>, record: Record<string, unknown>) => Record<string, KeyValue>;
|
|
179
293
|
/**
|
|
180
294
|
* Result of policy-aware GSI update composition.
|
|
181
295
|
*
|
|
@@ -186,7 +300,7 @@ export declare const composeAllKeys: (schema: DynamoSchema.DynamoSchema, entityT
|
|
|
186
300
|
* in both for the same update.
|
|
187
301
|
*/
|
|
188
302
|
export interface GsiUpdateResult {
|
|
189
|
-
readonly sets: Record<string,
|
|
303
|
+
readonly sets: Record<string, KeyValue>;
|
|
190
304
|
readonly removes: ReadonlyArray<string>;
|
|
191
305
|
}
|
|
192
306
|
/**
|
|
@@ -311,12 +425,18 @@ export type { CompositeKeyHoleError };
|
|
|
311
425
|
* the supplied one: `status_done` would also match `status_done_archived`
|
|
312
426
|
* and `status_doneish` (issue #115).
|
|
313
427
|
* - **Complete key** — every composite was supplied, so the stored key ends
|
|
314
|
-
* here. Appending a delimiter would match nothing
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
428
|
+
* here. Appending a delimiter would match nothing — and leaving it off makes
|
|
429
|
+
* `begins_with` match every longer value of the last composite (`a` also
|
|
430
|
+
* matching `ab`). A complete key is matched with `=` instead: see
|
|
431
|
+
* {@link composeSortKeyCondition}, which query accessors use.
|
|
432
|
+
*
|
|
433
|
+
* Numeric composites need both halves of the rule: an integer's text is a
|
|
434
|
+
* prefix of a fraction's (`0000000000000003` of `0000000000000003.14`), so
|
|
435
|
+
* `{ seq: 3 }` as a bare `begins_with` operand would also match `seq` 3.14
|
|
436
|
+
* and 3.5 — whether `seq` is followed by further composites (the delimiter
|
|
437
|
+
* stops it) or is the last one (`=` stops it). Only non-negative integers are
|
|
438
|
+
* fixed-width — do NOT "simplify" the rule away on the grounds that integer
|
|
439
|
+
* fixtures pass either way.
|
|
320
440
|
*
|
|
321
441
|
* Every consumer that turns SK composites into a key *prefix* must use this
|
|
322
442
|
* function (or the same rule) — the entity/GSI query accessors and the
|
|
@@ -324,6 +444,24 @@ export type { CompositeKeyHoleError };
|
|
|
324
444
|
* prefix. Two call sites disagreeing about where a segment ends is the bug.
|
|
325
445
|
*/
|
|
326
446
|
export declare const composeSortKeyBeginsWith: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, index: IndexDefinition, record: Record<string, unknown>) => string;
|
|
447
|
+
/**
|
|
448
|
+
* The sort key condition a query accessor sends for the leading SK composites
|
|
449
|
+
* present in `record` (the caller has checked at least one is):
|
|
450
|
+
*
|
|
451
|
+
* - **Complete key** — every composite supplied: `{ eq }` on the composed
|
|
452
|
+
* key, which is exactly the key `composeSk` writes. `begins_with` on it
|
|
453
|
+
* would also match every longer value of the last composite — `name: "a"`
|
|
454
|
+
* matching `"ab"`, and `seq: 3` matching 3.14 and 3.5, whose key text
|
|
455
|
+
* extends 3's. On the primary index `=` also leaves out the item's history
|
|
456
|
+
* rows, whose keys extend the current one.
|
|
457
|
+
* - **Partial prefix** — `{ beginsWith }` on {@link composeSortKeyBeginsWith}:
|
|
458
|
+
* the prefix and the delimiter, so it stops on a segment boundary.
|
|
459
|
+
*/
|
|
460
|
+
export declare const composeSortKeyCondition: (schema: DynamoSchema.DynamoSchema, entityType: string, entityVersion: number, index: IndexDefinition, record: Record<string, unknown>) => {
|
|
461
|
+
readonly eq: string;
|
|
462
|
+
} | {
|
|
463
|
+
readonly beginsWith: string;
|
|
464
|
+
};
|
|
327
465
|
/**
|
|
328
466
|
* Compose a partial sort key prefix for query operations.
|
|
329
467
|
* Used when not all SK composite attributes are provided.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyComposer.d.ts","sourceRoot":"","sources":["../src/KeyComposer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAStD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD,
|
|
1
|
+
{"version":3,"file":"KeyComposer.d.ts","sourceRoot":"","sources":["../src/KeyComposer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAStD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAGL,KAAK,MAAM,EAGZ,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,KAAK,iBAAiB,EAAoB,MAAM,+BAA+B,CAAA;AACxF,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAE1C;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAA;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CACxB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa,CAAC,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzE,8CAA8C;IAC9C,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