graphddb 0.2.0 → 0.2.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/README.md +68 -3
- package/dist/{chunk-UNRQ5YJT.js → chunk-27XBTYVK.js} +1 -1
- package/dist/{chunk-347U24SB.js → chunk-3MI43FHU.js} +519 -48
- package/dist/{chunk-F27INYI2.js → chunk-CXIAECRS.js} +272 -97
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +5 -19
- package/dist/index.js +113 -7
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/{types-D6qLpw2M.d.ts → types-SKxZQbQO.d.ts} +230 -122
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
buildUpdateInput,
|
|
14
14
|
captureWrite,
|
|
15
15
|
commitTransaction,
|
|
16
|
+
compileRawCondition,
|
|
16
17
|
createColumnMap,
|
|
17
18
|
execItemKeySignature,
|
|
18
19
|
executeDelete,
|
|
@@ -20,14 +21,18 @@ import {
|
|
|
20
21
|
executeTransaction,
|
|
21
22
|
executeUpdate,
|
|
22
23
|
isColumn,
|
|
24
|
+
isParam,
|
|
25
|
+
isRawCondition,
|
|
26
|
+
param,
|
|
23
27
|
pkTemplate,
|
|
24
28
|
resolveKey,
|
|
25
29
|
resolveModelClass,
|
|
26
30
|
resolveSegmentedKey,
|
|
27
31
|
segmentFieldNames,
|
|
28
32
|
serializeFieldValue,
|
|
33
|
+
serializeRawCondition,
|
|
29
34
|
skTemplate
|
|
30
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-3MI43FHU.js";
|
|
31
36
|
|
|
32
37
|
// src/spec/types.ts
|
|
33
38
|
var SPEC_VERSION = "1.0";
|
|
@@ -236,51 +241,6 @@ function getImplicitKeyFields(select, metadata) {
|
|
|
236
241
|
return [...needed];
|
|
237
242
|
}
|
|
238
243
|
|
|
239
|
-
// src/define/param.ts
|
|
240
|
-
function makeParam(kind, literals) {
|
|
241
|
-
return literals === void 0 ? { kind } : { kind, literals };
|
|
242
|
-
}
|
|
243
|
-
var param = {
|
|
244
|
-
/** A placeholder for a `string` value. */
|
|
245
|
-
string() {
|
|
246
|
-
return makeParam("string");
|
|
247
|
-
},
|
|
248
|
-
/** A placeholder for a `number` value. */
|
|
249
|
-
number() {
|
|
250
|
-
return makeParam("number");
|
|
251
|
-
},
|
|
252
|
-
/**
|
|
253
|
-
* A placeholder constrained to one of the given literal values. The value
|
|
254
|
-
* type of the resulting {@link Param} is the **union of the literals**, so it
|
|
255
|
-
* is preserved precisely in the IR and the inferred definition types.
|
|
256
|
-
*
|
|
257
|
-
* @example
|
|
258
|
-
* ```ts
|
|
259
|
-
* param.literal('active', 'disabled'); // Param<'active' | 'disabled'>
|
|
260
|
-
* ```
|
|
261
|
-
*/
|
|
262
|
-
literal(...values) {
|
|
263
|
-
return makeParam("literal", values);
|
|
264
|
-
},
|
|
265
|
-
/**
|
|
266
|
-
* A placeholder for an **array** parameter whose elements have the given field
|
|
267
|
-
* shape. Used by `defineTransaction`'s `tx.forEach(p.<arrayParam>, …)` to bind
|
|
268
|
-
* each element's fields to `{item.<field>}` templates.
|
|
269
|
-
*
|
|
270
|
-
* @example
|
|
271
|
-
* ```ts
|
|
272
|
-
* param.array({ userId: param.string(), role: param.string() });
|
|
273
|
-
* // Param<{ userId: string; role: string }[]>
|
|
274
|
-
* ```
|
|
275
|
-
*/
|
|
276
|
-
array(element) {
|
|
277
|
-
return { kind: "array", element };
|
|
278
|
-
}
|
|
279
|
-
};
|
|
280
|
-
function isParam(value) {
|
|
281
|
-
return typeof value === "object" && value !== null && "kind" in value && (value.kind === "string" || value.kind === "number" || value.kind === "literal" || value.kind === "array");
|
|
282
|
-
}
|
|
283
|
-
|
|
284
244
|
// src/planner/projection.ts
|
|
285
245
|
function buildProjection(select, additionalFields) {
|
|
286
246
|
const paths = [];
|
|
@@ -321,32 +281,6 @@ function buildProjection(select, additionalFields) {
|
|
|
321
281
|
};
|
|
322
282
|
}
|
|
323
283
|
|
|
324
|
-
// src/select/cond.ts
|
|
325
|
-
var RAW_COND = /* @__PURE__ */ Symbol.for("graphddb.rawCond");
|
|
326
|
-
function isRawCondition(value) {
|
|
327
|
-
return typeof value === "object" && value !== null && value[RAW_COND] === true;
|
|
328
|
-
}
|
|
329
|
-
function cond(template, ...parts) {
|
|
330
|
-
return {
|
|
331
|
-
[RAW_COND]: true,
|
|
332
|
-
template,
|
|
333
|
-
parts
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
function compileRawCondition(raw, allocName, allocValue) {
|
|
337
|
-
let out = raw.template[0];
|
|
338
|
-
for (let i = 0; i < raw.parts.length; i++) {
|
|
339
|
-
const part = raw.parts[i];
|
|
340
|
-
if (isColumn(part)) {
|
|
341
|
-
out += allocName(part.name);
|
|
342
|
-
} else {
|
|
343
|
-
out += allocValue(part);
|
|
344
|
-
}
|
|
345
|
-
out += raw.template[i + 1];
|
|
346
|
-
}
|
|
347
|
-
return out;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
284
|
// src/expression/filter-expression.ts
|
|
351
285
|
var LOGICAL_KEYS = /* @__PURE__ */ new Set(["and", "or", "not"]);
|
|
352
286
|
var OPERATOR_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1916,6 +1850,12 @@ function renderRecord(structure, key, params, context) {
|
|
|
1916
1850
|
}
|
|
1917
1851
|
function renderCondition(condition, key, params, context) {
|
|
1918
1852
|
if (condition === void 0) return void 0;
|
|
1853
|
+
if (isRawCondition(condition)) {
|
|
1854
|
+
const parts = condition.parts.map(
|
|
1855
|
+
(part) => isColumn(part) ? part : renderLeaf(part, key, params, `${context} condition`)
|
|
1856
|
+
);
|
|
1857
|
+
return { ...condition, parts };
|
|
1858
|
+
}
|
|
1919
1859
|
if (typeof condition === "object" && condition !== null) {
|
|
1920
1860
|
const obj = condition;
|
|
1921
1861
|
if (obj.notExists === true) return { notExists: true };
|
|
@@ -2003,14 +1943,14 @@ function renderConditionCheck(check, key, params, contextLabel) {
|
|
|
2003
1943
|
modelClass,
|
|
2004
1944
|
referencedKey
|
|
2005
1945
|
);
|
|
2006
|
-
const
|
|
1946
|
+
const cond = buildConditionExpression({ attributeExists: "PK" });
|
|
2007
1947
|
const checkInput = {
|
|
2008
1948
|
TableName,
|
|
2009
1949
|
Key,
|
|
2010
|
-
ConditionExpression:
|
|
1950
|
+
ConditionExpression: cond.expression
|
|
2011
1951
|
};
|
|
2012
|
-
if (Object.keys(
|
|
2013
|
-
if (Object.keys(
|
|
1952
|
+
if (Object.keys(cond.names).length > 0) checkInput.ExpressionAttributeNames = cond.names;
|
|
1953
|
+
if (Object.keys(cond.values).length > 0) checkInput.ExpressionAttributeValues = cond.values;
|
|
2014
1954
|
return checkInput;
|
|
2015
1955
|
}
|
|
2016
1956
|
var RUNTIME_TOKEN_RE = /\{([^{}]+)\}/g;
|
|
@@ -2093,10 +2033,10 @@ function renderUniqueGuardItems(guard, key, params, contextLabel) {
|
|
|
2093
2033
|
if (item.type === "Put") {
|
|
2094
2034
|
const Item = renderTemplateRecord(item.item, key, params, `${contextLabel} guard Put`);
|
|
2095
2035
|
const put = { TableName: TableMapping.resolve(item.tableName), Item };
|
|
2096
|
-
const
|
|
2097
|
-
put.ConditionExpression =
|
|
2098
|
-
if (Object.keys(
|
|
2099
|
-
if (Object.keys(
|
|
2036
|
+
const cond = buildConditionExpression({ attributeNotExists: "PK" });
|
|
2037
|
+
put.ConditionExpression = cond.expression;
|
|
2038
|
+
if (Object.keys(cond.names).length > 0) put.ExpressionAttributeNames = cond.names;
|
|
2039
|
+
if (Object.keys(cond.values).length > 0) put.ExpressionAttributeValues = cond.values;
|
|
2100
2040
|
return { Put: put };
|
|
2101
2041
|
}
|
|
2102
2042
|
const Key = renderTemplateRecord(item.keyCondition, key, params, `${contextLabel} guard Delete`);
|
|
@@ -2115,10 +2055,10 @@ function renderIdempotencyGuardItems(guard, key, params, contextLabel) {
|
|
|
2115
2055
|
return guard.items.map((item) => {
|
|
2116
2056
|
const Item = renderTemplateRecord(item.item, key, params, `${contextLabel} idempotency Put`);
|
|
2117
2057
|
const put = { TableName: TableMapping.resolve(item.tableName), Item };
|
|
2118
|
-
const
|
|
2119
|
-
put.ConditionExpression =
|
|
2120
|
-
if (Object.keys(
|
|
2121
|
-
if (Object.keys(
|
|
2058
|
+
const cond = buildConditionExpression({ attributeNotExists: "PK" });
|
|
2059
|
+
put.ConditionExpression = cond.expression;
|
|
2060
|
+
if (Object.keys(cond.names).length > 0) put.ExpressionAttributeNames = cond.names;
|
|
2061
|
+
if (Object.keys(cond.values).length > 0) put.ExpressionAttributeValues = cond.values;
|
|
2122
2062
|
return { Put: put };
|
|
2123
2063
|
});
|
|
2124
2064
|
}
|
|
@@ -3891,17 +3831,24 @@ function describeKey(fragment) {
|
|
|
3891
3831
|
}
|
|
3892
3832
|
|
|
3893
3833
|
// src/spec/guard.ts
|
|
3894
|
-
function conditionInputToSpec(condition, context, renderLeaf2) {
|
|
3834
|
+
function conditionInputToSpec(condition, context, renderLeaf2, renderTreeLeaf, renderRawSlot) {
|
|
3895
3835
|
if (condition === void 0 || condition === null) return void 0;
|
|
3836
|
+
if (isRawCondition(condition)) {
|
|
3837
|
+
const { expression, names, values } = serializeRawCondition(
|
|
3838
|
+
condition,
|
|
3839
|
+
renderRawSlot
|
|
3840
|
+
);
|
|
3841
|
+
return { kind: "raw", expression, names, values };
|
|
3842
|
+
}
|
|
3896
3843
|
if (typeof condition !== "object") {
|
|
3897
3844
|
throw new Error(
|
|
3898
|
-
`${context}: write condition must be an object (\`{ notExists: true }\`, \`{ attributeExists: '<field>' }\`, \`{ attributeNotExists: '<field>' }\`, or field
|
|
3845
|
+
`${context}: write condition must be an object (\`{ notExists: true }\`, \`{ attributeExists: '<field>' }\`, \`{ attributeNotExists: '<field>' }\`, or a declarative field condition).`
|
|
3899
3846
|
);
|
|
3900
3847
|
}
|
|
3901
3848
|
const obj = condition;
|
|
3902
3849
|
if (obj.notExists === true) return { kind: "notExists" };
|
|
3903
|
-
if ("attributeExists" in obj) {
|
|
3904
|
-
if (
|
|
3850
|
+
if ("attributeExists" in obj && typeof obj.attributeExists === "string") {
|
|
3851
|
+
if (obj.attributeExists.length === 0) {
|
|
3905
3852
|
throw new Error(
|
|
3906
3853
|
`${context}: \`attributeExists\` must name a non-empty attribute field.`
|
|
3907
3854
|
);
|
|
@@ -3916,12 +3863,122 @@ function conditionInputToSpec(condition, context, renderLeaf2) {
|
|
|
3916
3863
|
}
|
|
3917
3864
|
return { kind: "attributeNotExists", field: obj.attributeNotExists };
|
|
3918
3865
|
}
|
|
3866
|
+
if (usesOperatorTree(obj)) {
|
|
3867
|
+
const leaf = renderTreeLeaf ?? ((value, name) => defaultTreeLeaf(value, name, context));
|
|
3868
|
+
return { kind: "expr", declarative: buildTree(obj, context, leaf) };
|
|
3869
|
+
}
|
|
3919
3870
|
const fields = {};
|
|
3920
3871
|
for (const key of Object.keys(obj).sort()) {
|
|
3921
3872
|
fields[key] = renderLeaf2(key, obj[key]);
|
|
3922
3873
|
}
|
|
3923
3874
|
return { kind: "equals", fields };
|
|
3924
3875
|
}
|
|
3876
|
+
function assertNotNestedRaw(sub, context) {
|
|
3877
|
+
if (isRawCondition(sub)) {
|
|
3878
|
+
throw new Error(
|
|
3879
|
+
`${context}: a raw \`cond\` write condition may be used as a whole condition, but not nested inside an \`and\` / \`or\` / \`not\` group of a serializable (public-contract / Python-bridge) command. Move the \`cond\` to the top level, or express the group declaratively.`
|
|
3880
|
+
);
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
var LOGICAL_KEYS2 = /* @__PURE__ */ new Set(["and", "or", "not"]);
|
|
3884
|
+
var OPERATOR_KEYS2 = /* @__PURE__ */ new Set([
|
|
3885
|
+
"eq",
|
|
3886
|
+
"ne",
|
|
3887
|
+
"gt",
|
|
3888
|
+
"ge",
|
|
3889
|
+
"lt",
|
|
3890
|
+
"le",
|
|
3891
|
+
"between",
|
|
3892
|
+
"in",
|
|
3893
|
+
"beginsWith",
|
|
3894
|
+
"contains",
|
|
3895
|
+
"notContains",
|
|
3896
|
+
"attributeExists",
|
|
3897
|
+
"attributeType",
|
|
3898
|
+
"size"
|
|
3899
|
+
]);
|
|
3900
|
+
function isOperatorObject2(value) {
|
|
3901
|
+
if (typeof value !== "object" || value === null || Array.isArray(value) || value instanceof Date) {
|
|
3902
|
+
return false;
|
|
3903
|
+
}
|
|
3904
|
+
const keys = Object.keys(value);
|
|
3905
|
+
if (keys.length === 0) return false;
|
|
3906
|
+
return keys.every((k) => OPERATOR_KEYS2.has(k));
|
|
3907
|
+
}
|
|
3908
|
+
function usesOperatorTree(obj) {
|
|
3909
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
3910
|
+
if (LOGICAL_KEYS2.has(key)) return true;
|
|
3911
|
+
if (isOperatorObject2(value)) return true;
|
|
3912
|
+
}
|
|
3913
|
+
return false;
|
|
3914
|
+
}
|
|
3915
|
+
function defaultTreeLeaf(value, name, context) {
|
|
3916
|
+
void name;
|
|
3917
|
+
if (value instanceof Date) return value.toISOString();
|
|
3918
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
3919
|
+
return value;
|
|
3920
|
+
}
|
|
3921
|
+
throw new Error(
|
|
3922
|
+
`${context}: condition operand must be a concrete literal or a param; got ${typeof value}.`
|
|
3923
|
+
);
|
|
3924
|
+
}
|
|
3925
|
+
function conditionParamName(field, op, index) {
|
|
3926
|
+
if (op === "between") return `${field}_${index === 0 ? "lo" : "hi"}`;
|
|
3927
|
+
if (op === "in") return `${field}_${index ?? 0}`;
|
|
3928
|
+
if (op === "size") return `${field}_size`;
|
|
3929
|
+
return field;
|
|
3930
|
+
}
|
|
3931
|
+
function buildTree(obj, context, renderTreeLeaf) {
|
|
3932
|
+
const out = {};
|
|
3933
|
+
for (const key of Object.keys(obj).sort()) {
|
|
3934
|
+
const value = obj[key];
|
|
3935
|
+
if (value === void 0) continue;
|
|
3936
|
+
if (key === "and" || key === "or") {
|
|
3937
|
+
out[key] = value.map((sub) => {
|
|
3938
|
+
assertNotNestedRaw(sub, context);
|
|
3939
|
+
return buildTree(sub, context, renderTreeLeaf);
|
|
3940
|
+
});
|
|
3941
|
+
continue;
|
|
3942
|
+
}
|
|
3943
|
+
if (key === "not") {
|
|
3944
|
+
assertNotNestedRaw(value, context);
|
|
3945
|
+
out[key] = buildTree(
|
|
3946
|
+
value,
|
|
3947
|
+
context,
|
|
3948
|
+
renderTreeLeaf
|
|
3949
|
+
);
|
|
3950
|
+
continue;
|
|
3951
|
+
}
|
|
3952
|
+
if (!isOperatorObject2(value)) {
|
|
3953
|
+
out[key] = { eq: renderTreeLeaf(value, conditionParamName(key, "eq")) };
|
|
3954
|
+
continue;
|
|
3955
|
+
}
|
|
3956
|
+
const ops = value;
|
|
3957
|
+
const rendered = {};
|
|
3958
|
+
for (const op of Object.keys(ops).sort()) {
|
|
3959
|
+
const opVal = ops[op];
|
|
3960
|
+
if (op === "between") {
|
|
3961
|
+
const [lo, hi] = opVal;
|
|
3962
|
+
rendered[op] = [
|
|
3963
|
+
renderTreeLeaf(lo, conditionParamName(key, op, 0)),
|
|
3964
|
+
renderTreeLeaf(hi, conditionParamName(key, op, 1))
|
|
3965
|
+
];
|
|
3966
|
+
} else if (op === "in") {
|
|
3967
|
+
rendered[op] = opVal.map(
|
|
3968
|
+
(v, i) => renderTreeLeaf(v, conditionParamName(key, op, i))
|
|
3969
|
+
);
|
|
3970
|
+
} else if (op === "attributeExists") {
|
|
3971
|
+
rendered[op] = opVal;
|
|
3972
|
+
} else if (op === "attributeType") {
|
|
3973
|
+
rendered[op] = String(opVal);
|
|
3974
|
+
} else {
|
|
3975
|
+
rendered[op] = renderTreeLeaf(opVal, conditionParamName(key, op));
|
|
3976
|
+
}
|
|
3977
|
+
}
|
|
3978
|
+
out[key] = rendered;
|
|
3979
|
+
}
|
|
3980
|
+
return out;
|
|
3981
|
+
}
|
|
3925
3982
|
function assertSupportedCondition(commandName, condition) {
|
|
3926
3983
|
if (condition.kind === "notExists") return;
|
|
3927
3984
|
if (condition.kind === "attributeExists" || condition.kind === "attributeNotExists") {
|
|
@@ -3948,8 +4005,25 @@ function assertSupportedCondition(commandName, condition) {
|
|
|
3948
4005
|
}
|
|
3949
4006
|
return;
|
|
3950
4007
|
}
|
|
4008
|
+
if (condition.kind === "raw") {
|
|
4009
|
+
if (typeof condition.expression !== "string" || condition.expression.length === 0) {
|
|
4010
|
+
throw new Error(
|
|
4011
|
+
`Command '${commandName}' has an empty raw \`cond\` write condition.`
|
|
4012
|
+
);
|
|
4013
|
+
}
|
|
4014
|
+
return;
|
|
4015
|
+
}
|
|
4016
|
+
if (condition.kind === "expr") {
|
|
4017
|
+
const tree = condition.declarative;
|
|
4018
|
+
if (!tree || Object.keys(tree).length === 0) {
|
|
4019
|
+
throw new Error(
|
|
4020
|
+
`Command '${commandName}' has an empty declarative write condition.`
|
|
4021
|
+
);
|
|
4022
|
+
}
|
|
4023
|
+
return;
|
|
4024
|
+
}
|
|
3951
4025
|
throw new Error(
|
|
3952
|
-
`Command '${commandName}' has an unsupported write condition
|
|
4026
|
+
`Command '${commandName}' has an unsupported write condition.`
|
|
3953
4027
|
);
|
|
3954
4028
|
}
|
|
3955
4029
|
function assertJsonSerializable(value, path = "$") {
|
|
@@ -4498,6 +4572,17 @@ function leafTemplate(value, context) {
|
|
|
4498
4572
|
`defineTransaction: ${context} must be a field reference (from \`p\` or a forEach element) or a concrete literal; got ${typeof value}.`
|
|
4499
4573
|
);
|
|
4500
4574
|
}
|
|
4575
|
+
function conditionTreeLeaf(value, name, context) {
|
|
4576
|
+
void name;
|
|
4577
|
+
if (isTransactionRef(value)) return { $param: tokenName(value.token) };
|
|
4578
|
+
if (value instanceof Date) return value.toISOString();
|
|
4579
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
4580
|
+
return value;
|
|
4581
|
+
}
|
|
4582
|
+
throw new Error(
|
|
4583
|
+
`defineTransaction: ${context} condition operand must be a field reference (from \`p\` or a forEach element) or a concrete literal; got ${typeof value}.`
|
|
4584
|
+
);
|
|
4585
|
+
}
|
|
4501
4586
|
function templateRecord2(structure, context) {
|
|
4502
4587
|
const out = {};
|
|
4503
4588
|
for (const field of Object.keys(structure).sort()) {
|
|
@@ -4541,7 +4626,12 @@ function conditionSpec(condition, commandName) {
|
|
|
4541
4626
|
const spec = conditionInputToSpec(
|
|
4542
4627
|
condition,
|
|
4543
4628
|
commandName,
|
|
4544
|
-
(field, value) => leafTemplate(value, `condition field '${field}'`)
|
|
4629
|
+
(field, value) => leafTemplate(value, `condition field '${field}'`),
|
|
4630
|
+
(value, name) => conditionTreeLeaf(value, name, commandName),
|
|
4631
|
+
// A raw `cond` value slot in a transaction is a field reference
|
|
4632
|
+
// (`p.*` / forEach element) → a `{ $param }` marker carrying its token name;
|
|
4633
|
+
// a concrete literal falls through to the default renderer (issue #114-B).
|
|
4634
|
+
(part) => isTransactionRef(part) ? { $param: tokenName(part.token) } : void 0
|
|
4545
4635
|
);
|
|
4546
4636
|
if (spec) assertSupportedCondition(commandName, spec);
|
|
4547
4637
|
return spec;
|
|
@@ -4593,12 +4683,51 @@ function buildWriteItem(instr, forEachSource, txName) {
|
|
|
4593
4683
|
)
|
|
4594
4684
|
};
|
|
4595
4685
|
}
|
|
4686
|
+
const changes = templateRecord2(instr.changes ?? {}, `${txName} update changes`);
|
|
4687
|
+
injectTransactionGsiRederive(
|
|
4688
|
+
metadata,
|
|
4689
|
+
instr.key ?? {},
|
|
4690
|
+
instr.changes ?? {},
|
|
4691
|
+
changes,
|
|
4692
|
+
`${txName} update on '${entity}'`
|
|
4693
|
+
);
|
|
4596
4694
|
return {
|
|
4597
4695
|
...base,
|
|
4598
4696
|
keyCondition: keyConditionTemplate2(metadata, instr.key ?? {}, `${txName} update`),
|
|
4599
|
-
changes
|
|
4697
|
+
changes
|
|
4600
4698
|
};
|
|
4601
4699
|
}
|
|
4700
|
+
function injectTransactionGsiRederive(metadata, keyStructure, changeStructure, changes, context) {
|
|
4701
|
+
if (metadata.gsiDefinitions.length === 0) return;
|
|
4702
|
+
const changedFields = new Set(Object.keys(changeStructure));
|
|
4703
|
+
const nameByField = /* @__PURE__ */ new Map();
|
|
4704
|
+
for (const [field, value] of Object.entries(keyStructure)) {
|
|
4705
|
+
if (isTransactionRef(value)) nameByField.set(field, tokenName(value.token));
|
|
4706
|
+
}
|
|
4707
|
+
for (const [field, value] of Object.entries(changeStructure)) {
|
|
4708
|
+
if (isTransactionRef(value)) nameByField.set(field, tokenName(value.token));
|
|
4709
|
+
}
|
|
4710
|
+
const available = new Set(nameByField.keys());
|
|
4711
|
+
for (const gsi of metadata.gsiDefinitions) {
|
|
4712
|
+
if (!gsi.inputFieldNames.some((f) => changedFields.has(f))) continue;
|
|
4713
|
+
const missing = gsi.inputFieldNames.filter((f) => !available.has(f));
|
|
4714
|
+
if (missing.length > 0) {
|
|
4715
|
+
const changed = gsi.inputFieldNames.filter((f) => changedFields.has(f));
|
|
4716
|
+
throw new Error(
|
|
4717
|
+
`defineTransaction: ${context}: updating ${changed.map((f) => `'${f}'`).join(", ")} affects index '${gsi.indexName}' (also depends on ${missing.map((f) => `'${f}'`).join(", ")}); add ${missing.length > 1 ? "them" : "it"} to the update key or changes.`
|
|
4718
|
+
);
|
|
4719
|
+
}
|
|
4720
|
+
const present = new Set(gsi.inputFieldNames);
|
|
4721
|
+
const { pk, sk } = evaluateKey(
|
|
4722
|
+
gsi.segmented,
|
|
4723
|
+
"param",
|
|
4724
|
+
present,
|
|
4725
|
+
(f) => nameByField.get(f) ?? f
|
|
4726
|
+
);
|
|
4727
|
+
changes[`${gsi.indexName}PK`] = pk;
|
|
4728
|
+
if (sk !== void 0) changes[`${gsi.indexName}SK`] = sk;
|
|
4729
|
+
}
|
|
4730
|
+
}
|
|
4602
4731
|
function buildTransactionSpec(txName, def) {
|
|
4603
4732
|
const items = [];
|
|
4604
4733
|
let hasForEach = false;
|
|
@@ -5092,9 +5221,32 @@ function extractCondition(def) {
|
|
|
5092
5221
|
return conditionInputToSpec(
|
|
5093
5222
|
def.condition,
|
|
5094
5223
|
`Command on '${def.entity.name}'`,
|
|
5095
|
-
(field, value) => templateLeaf(field, value)
|
|
5224
|
+
(field, value) => templateLeaf(field, value),
|
|
5225
|
+
(value, name) => conditionTreeLeaf2(value, name),
|
|
5226
|
+
// A raw `cond` value slot (issue #114-B): a contract param / key ref carries
|
|
5227
|
+
// its own name; a plain `param.*` falls through to the positional default.
|
|
5228
|
+
(part) => {
|
|
5229
|
+
if (isContractParamRef(part)) return { $param: tokenName2(part.token) };
|
|
5230
|
+
if (isContractKeyFieldRef(part)) return { $param: part.field };
|
|
5231
|
+
return void 0;
|
|
5232
|
+
}
|
|
5096
5233
|
);
|
|
5097
5234
|
}
|
|
5235
|
+
function conditionTreeLeaf2(value, name) {
|
|
5236
|
+
if (isContractParamRef(value)) return { $param: tokenName2(value.token) };
|
|
5237
|
+
if (isContractKeyFieldRef(value)) return { $param: value.field };
|
|
5238
|
+
if (isParam(value)) return { $param: name };
|
|
5239
|
+
if (value instanceof Date) return value.toISOString();
|
|
5240
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
5241
|
+
return value;
|
|
5242
|
+
}
|
|
5243
|
+
throw new Error(
|
|
5244
|
+
`A declarative write-condition operand must be a concrete literal or a param reference; got ${typeof value}.`
|
|
5245
|
+
);
|
|
5246
|
+
}
|
|
5247
|
+
function tokenName2(token) {
|
|
5248
|
+
return token.startsWith("{") && token.endsWith("}") ? token.slice(1, -1) : token;
|
|
5249
|
+
}
|
|
5098
5250
|
function buildQuerySpec(def) {
|
|
5099
5251
|
const operations = buildReadOperations(def);
|
|
5100
5252
|
const executionPlan = deriveExecutionPlan(operations.map((op) => op.resultPath));
|
|
@@ -5252,6 +5404,7 @@ function convertLeaf(leaf, bindField, place, context) {
|
|
|
5252
5404
|
);
|
|
5253
5405
|
}
|
|
5254
5406
|
function convertCondition(condition, place, context) {
|
|
5407
|
+
if (isRawCondition(condition)) return condition;
|
|
5255
5408
|
if (typeof condition === "object" && condition !== null) {
|
|
5256
5409
|
const obj = condition;
|
|
5257
5410
|
if (obj.notExists === true) return { notExists: true };
|
|
@@ -5414,8 +5567,32 @@ function toElementRecord(record, keyParams) {
|
|
|
5414
5567
|
return out;
|
|
5415
5568
|
}
|
|
5416
5569
|
function toElementCondition(condition, keyParams) {
|
|
5417
|
-
if (condition.kind
|
|
5418
|
-
|
|
5570
|
+
if (condition.kind === "equals") {
|
|
5571
|
+
return { kind: "equals", fields: toElementRecord(condition.fields, keyParams) };
|
|
5572
|
+
}
|
|
5573
|
+
if (condition.kind === "expr") {
|
|
5574
|
+
return { kind: "expr", declarative: toElementTree(condition.declarative, keyParams) };
|
|
5575
|
+
}
|
|
5576
|
+
if (condition.kind === "raw") {
|
|
5577
|
+
return {
|
|
5578
|
+
kind: "raw",
|
|
5579
|
+
expression: condition.expression,
|
|
5580
|
+
names: condition.names,
|
|
5581
|
+
values: toElementTree(condition.values, keyParams)
|
|
5582
|
+
};
|
|
5583
|
+
}
|
|
5584
|
+
return condition;
|
|
5585
|
+
}
|
|
5586
|
+
function toElementTree(node, keyParams) {
|
|
5587
|
+
if (Array.isArray(node)) return node.map((n) => toElementTree(n, keyParams));
|
|
5588
|
+
if (node === null || typeof node !== "object") return node;
|
|
5589
|
+
const obj = node;
|
|
5590
|
+
if (typeof obj.$param === "string" && !obj.$param.startsWith("item.")) {
|
|
5591
|
+
return keyParams.has(obj.$param) ? { $param: `item.${obj.$param}` } : obj;
|
|
5592
|
+
}
|
|
5593
|
+
const out = {};
|
|
5594
|
+
for (const [k, v] of Object.entries(obj)) out[k] = toElementTree(v, keyParams);
|
|
5595
|
+
return out;
|
|
5419
5596
|
}
|
|
5420
5597
|
function synthesizeBatchTransaction(commandSpec, op) {
|
|
5421
5598
|
const keyParams = new Set(keyParamNames(op));
|
|
@@ -5948,10 +6125,7 @@ export {
|
|
|
5948
6125
|
normalizeSelectSpec,
|
|
5949
6126
|
detectRelationFields,
|
|
5950
6127
|
getImplicitKeyFields,
|
|
5951
|
-
param,
|
|
5952
|
-
isParam,
|
|
5953
6128
|
buildProjection,
|
|
5954
|
-
cond,
|
|
5955
6129
|
compileFilterExpression,
|
|
5956
6130
|
evaluateFilter,
|
|
5957
6131
|
plan,
|
|
@@ -6013,6 +6187,7 @@ export {
|
|
|
6013
6187
|
publicQueryModel,
|
|
6014
6188
|
publicCommandModel,
|
|
6015
6189
|
isPlannedCommandMethod,
|
|
6190
|
+
conditionParamName,
|
|
6016
6191
|
assertSupportedCondition,
|
|
6017
6192
|
assertJsonSerializable,
|
|
6018
6193
|
assertBundleSerializable,
|
package/dist/cli.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
buildBridgeBundle,
|
|
4
4
|
normalizeSelectSpec
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CXIAECRS.js";
|
|
6
6
|
import {
|
|
7
7
|
MetadataRegistry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3MI43FHU.js";
|
|
9
9
|
|
|
10
10
|
// src/cli.ts
|
|
11
11
|
import { createRequire } from "module";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SelectableOf, f as PrimaryKeyOf, E as Executor, g as ExecutionPlanSpec, h as SegmentedKey, i as SelectBuilderSpec, j as TransactionSpec, k as Manifest, l as ExecutionPlan,
|
|
2
|
-
export {
|
|
1
|
+
import { S as SelectableOf, f as PrimaryKeyOf, E as Executor, g as ExecutionPlanSpec, h as SegmentedKey, i as SelectBuilderSpec, R as RawCondition, j as TransactionSpec, k as Manifest, l as ExecutionPlan, m as ResolvedKey, D as DynamoDBOperation, a as ExecutorResult, B as BatchGetExecInput, P as PutInput, W as WriteExecOptions, b as WriteResult, U as UpdateInput, c as DeleteInput, d as BatchWriteExecItem, T as TransactWriteExecItem, n as CdcEmulatorOptions, o as ChangeHandler, p as Unsubscribe, F as FaultSpec, q as ConcurrentRecomputeRef, C as ChangeEvent, r as EventLog, s as ReplayOptions, t as ShardId, u as TransactionItemSpec, v as Param, w as ParamDescriptor, x as DefinitionMap, O as OperationDefinition, e as DDBModel, M as ModelStatic, y as WriteDefinitionOptions, z as PartialQueryKeyOf, A as StrictSelectSpec, G as EntityInput, H as UniqueQueryKeyOf, I as EntityRef, J as ConditionInput, Q as QueryModelContract, K as QueryMethodSpec, L as CommandModelContract, N as CommandMethodSpec, V as ContractSpec, X as QuerySpec, Y as CommandSpec, Z as ContextSpec, _ as OperationsDocument, $ as AnyOperationDefinition, a0 as BridgeBundle, a1 as ConditionSpec } from './types-SKxZQbQO.js';
|
|
2
|
+
export { a2 as BatchDeleteRequest, a3 as BatchGetRequest, a4 as BatchGetResult, a5 as BatchPutRequest, a6 as BatchResult, a7 as BatchWriteRequest, a8 as CONTRACT_RANGE_FANOUT_CONCURRENCY, a9 as CdcMode, aa as ChangeBatch, ab as ChangeEventName, ac as ClockMode, ad as Column, ae as ColumnMap, af as CommandContractMethodSpec, ag as CommandInputShape, ah as CommandMethod, ai as CommandPlan, aj as CommandResolutionTarget, ak as CommandResultKind, al as CommandSelectShape, am as CompiledFragment, an as ComposeSpec, ao as CondSlot, ap as ConditionCheckInput, aq as Connection, ar as ContractCallSignature, as as ContractCardinality, at as ContractCommandParams, au as ContractCommandResult, av as ContractComposeNode, aw as ContractFromRef, ax as ContractInputArity, ay as ContractItem, az as ContractKeyFieldRef, aA as ContractKeyInput, aB as ContractKeyRef, aC as ContractKeySpec, aD as ContractKind, aE as ContractMethodOp, aF as ContractParamRef, aG as ContractQueryParams, aH as ContractResolution, aI as DeleteOptions, aJ as DeriveEffect, aK as DerivedEdgeWrite, aL as DerivedUpdate, aM as DescriptorBinding, aN as ENTITY_WRITES_MARKER, aO as EdgeEffect, aP as EffectPath, aQ as EmitEffect, aR as EntityWritesDefinition, aS as EntityWritesShape, aT as ExecutableCommandContract, aU as ExecutableQueryContract, aV as FilterInput, aW as FilterSpec, aX as FragmentInput, aY as GsiDefinitionMarker, aZ as GsiOptions, a_ as IdempotencyEffect, a$ as InProcessWriteDescriptor, b0 as InputArity, b1 as KeyDefinitionMarker, b2 as KeySegment, b3 as KeySlot, b4 as KeyStructure, b5 as KeyedResult, b6 as LIFECYCLE_CONTRACT_MARKER, b7 as LifecycleContract, b8 as LifecycleEffects, b9 as LiteralParam, ba as ManifestEntity, bb as ManifestField, bc as ManifestFieldType, bd as ManifestGsi, be as ManifestKey, bf as ManifestRelation, bg as ManifestTable, bh as ModelRef, bi as MutateMode, bj as MutateOptions, bk as MutateParallelResult, bl as MutateTransactionResult, bm as MutationBody, bn as MutationDescriptorMap, bo as MutationFragment, bp as MutationInputProxy, bq as MutationInputRef, br as MutationIntent, bs as NumberParam, bt as OperationKind, bu as OperationSpec, bv as ParallelOpResult, bw as ParamKind, bx as ParamSpec, by as ParamStructure, bz as PlannedCommandMethod, bA as PutOptions, bB as QueryContractMethodSpec, bC as QueryEnvelopeResult, bD as QueryKeyOf, bE as QueryMethod, bF as QueryResult, bG as RangeConditionSpec, bH as ReadEnvelope, bI as ReadOperationType, bJ as ReadRouteDescriptor, bK as ReadRouteOptions, bL as ReadRouteResult, bM as RecordedCompose, bN as RelationBuilder, bO as RelationSelect, bP as RelationSpec, bQ as RequiresEffect, bR as Resolution, bS as SPEC_VERSION, bT as SegmentSpec, bU as SelectBuilder, bV as SelectOf, bW as StartingPosition, bX as StreamViewType, bY as StringParam, bZ as TransactionContext, b_ as TransactionItemType, b$ as UniqueEffect, c0 as Updatable, c1 as UpdateOptions, c2 as WhenSpec, c3 as WriteDescriptor, c4 as WriteEnvelope, c5 as WriteLifecyclePhase, c6 as WriteOperationType, c7 as WriteRecorder, c8 as WriteResultProjection, c9 as attachModelClass, ca as buildDeleteInput, cb as buildPutInput, cc as buildUpdateInput, cd as compileFragment, ce as compileMutationPlan, cf as compileSingleFragmentPlan, cg as cond, ch as contractOfMethodSpec, ci as definePlan, cj as entityWrites, ck as executeBatchGet, cl as executeBatchWrite, cm as executeCommandMethod, cn as executeDelete, co as executeKeyedBatchGet, cp as executePut, cq as executeQueryMethod, cr as executeRangeFanout, cs as executeTransaction, ct as executeUpdate, cu as from, cv as getEntityWrites, cw as gsi, cx as isColumn, cy as isCommandModelContract, cz as isCommandPlan, cA as isContractComposeNode, cB as isContractFromRef, cC as isContractKeyFieldRef, cD as isContractKeyRef, cE as isContractParamRef, cF as isEntityWritesDefinition, cG as isKeySegment, cH as isLifecycleContract, cI as isMutationFragment, cJ as isMutationInputRef, cK as isParam, cL as isPlannedCommandMethod, cM as isQueryModelContract, cN as k, cO as key, cP as lifecyclePhaseForIntent, cQ as mintContractKeyFieldRef, cR as mintContractParamRef, cS as mutation, cT as param, cU as publicCommandModel, cV as publicQueryModel, cW as query, cX as resolveLifecycle, cY as wholeKeysSentinel } from './types-SKxZQbQO.js';
|
|
3
3
|
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
|
|
4
4
|
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
|
|
5
5
|
|
|
@@ -420,22 +420,8 @@ interface ConditionExpressionResult {
|
|
|
420
420
|
names: Record<string, string>;
|
|
421
421
|
values: Record<string, unknown>;
|
|
422
422
|
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
*
|
|
426
|
-
* - `{ notExists: true }` → `attribute_not_exists(PK)` (legacy whole-row guard)
|
|
427
|
-
* - `{ attributeExists: 'email' }` → `attribute_exists(#cond_email)` (any field,
|
|
428
|
-
* incl. PK/SK)
|
|
429
|
-
* - `{ attributeNotExists: 'email' }` → `attribute_not_exists(#cond_email)`
|
|
430
|
-
* - `{ version: 3 }` → `#cond_version = :cond0`
|
|
431
|
-
* - `{ version: 3, status: 'active' }` → `#cond_version = :cond0 AND #cond_status = :cond1`
|
|
432
|
-
*
|
|
433
|
-
* Attribute name/value keys use the `cond_` prefix to avoid collisions with
|
|
434
|
-
* UpdateExpression names/values. The existence primitives go through a `#name`
|
|
435
|
-
* placeholder rather than a bare attribute so reserved-word fields (and PK/SK)
|
|
436
|
-
* are always legal.
|
|
437
|
-
*/
|
|
438
|
-
declare function buildConditionExpression(condition: Record<string, unknown>): ConditionExpressionResult;
|
|
423
|
+
|
|
424
|
+
declare function buildConditionExpression(condition: Record<string, unknown> | RawCondition): ConditionExpressionResult;
|
|
439
425
|
|
|
440
426
|
/**
|
|
441
427
|
* Compiled DynamoDB `FilterExpression`. Names are `#`-aliased column
|
|
@@ -2047,4 +2033,4 @@ declare function assertBundleSerializable(bundle: BridgeBundle): void;
|
|
|
2047
2033
|
*/
|
|
2048
2034
|
declare function buildBridgeBundle(queries?: DefinitionMap, commands?: DefinitionMap, registry?: typeof MetadataRegistry, transactions?: Record<string, TransactionDefinition>, contractInputs?: ContractInputs): BridgeBundle;
|
|
2049
2035
|
|
|
2050
|
-
export { type AnyModelContract, AnyOperationDefinition, BATCH_GET_MAX_KEYS, BATCH_WRITE_MAX_ITEMS, BatchGetExecInput, BatchWriteExecItem, BridgeBundle, type BuiltContracts, CdcEmulator, CdcEmulatorOptions, ChangeEvent, ChangeHandler, ClientManager, type CollectParams, CommandMethodSpec, CommandModelContract, CommandSpec, ConcurrentRecomputeRef, type ConditionExpressionResult, ConditionInput, ConditionSpec, type ContextOwnership, type ContextOwnershipMap, ContextSpec, type ContractBoundaryViolation, type ContractInputs, type ContractMap, type ContractN1Violation, ContractSpec, DDBModel, DefinitionMap, DeleteInput, DynamoDBOperation, DynamoExecutor, type DynamoType, EDGE_WRITES_MARKER, type EdgeLifecycle, type EdgeWriteDeclaration, type EdgeWriteRecorder, type EdgeWritesDefinition, type EmbeddedMetadata, type EntityMetadata, EntityRef, EventLog, ExecutionPlan, Executor, ExecutorResult, type ExplainInput, FaultSpec, type FieldMetadata, type FieldOptions, type FilterExpressionResult, type GsiDefinition, type KeyDefinition, type LintResult, type LintRule, Linter, type ListInput, type ListOptions, MAX_TRANSACT_ITEMS, Manifest, MetadataRegistry, type ModelOptions, ModelStatic, OLD_VALUE_NAMESPACE, OperationDefinition, OperationsDocument, Param, ParamDescriptor, type Parameterize, PartialQueryKeyOf, type PerKeyCursorEnvelope, type PlanInput, PrimaryKeyOf, type ProjectionResult, PutInput, QueryMethodSpec, QueryModelContract, type QueryOptions$1 as QueryOptions, QuerySpec, type RelationLimitOptions, type RelationMetadata, type RelationOptions, type RelationTraversalOptions, ReplayOptions, ResolvedKey, SegmentedKey, SelectableOf, ShardId, TableMapping, TransactWriteExecItem, type TransactionDefinition, TransactionItemSpec, type TransactionParamShape, type TransactionRef, TransactionSpec, type TxConditionCheckOptions, type TxForEachInstruction, type TxForEachOptions, type TxInstruction, type TxRecorder, type TxWriteInstruction, type TxWriteOptions, UniqueQueryKeyOf, type UpdateExpressionResult, UpdateInput, type WhenComparison, WriteDefinitionOptions, WriteExecOptions, WriteResult, assertBundleSerializable, assertContractBoundaries, assertContractN1Safe, assertJsonSerializable, assertSupportedCondition, belongsTo, binary, boolean, buildBridgeBundle, buildConditionExpression, buildContexts, buildContracts, buildManifest, buildOperations, buildProjection, buildQuerySpec, buildTransactionSpec, buildTransactions, buildUpdateExpression, collectContractBoundaryViolations, collectContractN1Violations, compileFilterExpression, createCdcEmulator, createDefaultLinter, datetime, decodeCursor, decodePerKeyCursor, defineCommands, defineDelete, defineList, definePut, defineQueries, defineQuery, defineTransaction, defineTransactions, defineUpdate, deriveEdgeWriteItems, deriveEdgeWriteItemsFor, deriveModelEdgeWriteItems, derivePrefix, detectRelationFields, edgeWrites, embedded, encodeCursor, encodePerKeyCursor, evaluateFilter, execute, executeDeclarativeTransaction, executeExplain, executeList, executeQuery, expandTransaction, field, getEdgeWrites, getImplicitKeyFields, gsiAmbiguityRule, hasMany, hasOne, hydrate, isEdgeWritesDefinition, isSelectBuilder, isTransactionRef, list, literal, map, missingGsiRule, model, noScanRule, number, numberSet, plan, queryBoundaryRule, relationDepthRule, requireLimitRule, resolveKey, resolveRelations, serializeContractKey, serializeFieldValue, string, stringSet, validateDepth, validateGsiAmbiguity, when };
|
|
2036
|
+
export { type AnyModelContract, AnyOperationDefinition, BATCH_GET_MAX_KEYS, BATCH_WRITE_MAX_ITEMS, BatchGetExecInput, BatchWriteExecItem, BridgeBundle, type BuiltContracts, CdcEmulator, CdcEmulatorOptions, ChangeEvent, ChangeHandler, ClientManager, type CollectParams, CommandMethodSpec, CommandModelContract, CommandSpec, ConcurrentRecomputeRef, type ConditionExpressionResult, ConditionInput, ConditionSpec, type ContextOwnership, type ContextOwnershipMap, ContextSpec, type ContractBoundaryViolation, type ContractInputs, type ContractMap, type ContractN1Violation, ContractSpec, DDBModel, DefinitionMap, DeleteInput, DynamoDBOperation, DynamoExecutor, type DynamoType, EDGE_WRITES_MARKER, type EdgeLifecycle, type EdgeWriteDeclaration, type EdgeWriteRecorder, type EdgeWritesDefinition, type EmbeddedMetadata, type EntityMetadata, EntityRef, EventLog, ExecutionPlan, Executor, ExecutorResult, type ExplainInput, FaultSpec, type FieldMetadata, type FieldOptions, type FilterExpressionResult, type GsiDefinition, type KeyDefinition, type LintResult, type LintRule, Linter, type ListInput, type ListOptions, MAX_TRANSACT_ITEMS, Manifest, MetadataRegistry, type ModelOptions, ModelStatic, OLD_VALUE_NAMESPACE, OperationDefinition, OperationsDocument, Param, ParamDescriptor, type Parameterize, PartialQueryKeyOf, type PerKeyCursorEnvelope, type PlanInput, PrimaryKeyOf, type ProjectionResult, PutInput, QueryMethodSpec, QueryModelContract, type QueryOptions$1 as QueryOptions, QuerySpec, RawCondition, type RelationLimitOptions, type RelationMetadata, type RelationOptions, type RelationTraversalOptions, ReplayOptions, ResolvedKey, SegmentedKey, SelectableOf, ShardId, TableMapping, TransactWriteExecItem, type TransactionDefinition, TransactionItemSpec, type TransactionParamShape, type TransactionRef, TransactionSpec, type TxConditionCheckOptions, type TxForEachInstruction, type TxForEachOptions, type TxInstruction, type TxRecorder, type TxWriteInstruction, type TxWriteOptions, UniqueQueryKeyOf, type UpdateExpressionResult, UpdateInput, type WhenComparison, WriteDefinitionOptions, WriteExecOptions, WriteResult, assertBundleSerializable, assertContractBoundaries, assertContractN1Safe, assertJsonSerializable, assertSupportedCondition, belongsTo, binary, boolean, buildBridgeBundle, buildConditionExpression, buildContexts, buildContracts, buildManifest, buildOperations, buildProjection, buildQuerySpec, buildTransactionSpec, buildTransactions, buildUpdateExpression, collectContractBoundaryViolations, collectContractN1Violations, compileFilterExpression, createCdcEmulator, createDefaultLinter, datetime, decodeCursor, decodePerKeyCursor, defineCommands, defineDelete, defineList, definePut, defineQueries, defineQuery, defineTransaction, defineTransactions, defineUpdate, deriveEdgeWriteItems, deriveEdgeWriteItemsFor, deriveModelEdgeWriteItems, derivePrefix, detectRelationFields, edgeWrites, embedded, encodeCursor, encodePerKeyCursor, evaluateFilter, execute, executeDeclarativeTransaction, executeExplain, executeList, executeQuery, expandTransaction, field, getEdgeWrites, getImplicitKeyFields, gsiAmbiguityRule, hasMany, hasOne, hydrate, isEdgeWritesDefinition, isSelectBuilder, isTransactionRef, list, literal, map, missingGsiRule, model, noScanRule, number, numberSet, plan, queryBoundaryRule, relationDepthRule, requireLimitRule, resolveKey, resolveRelations, serializeContractKey, serializeFieldValue, string, stringSet, validateDepth, validateGsiAmbiguity, when };
|