graphddb 1.0.1 → 1.0.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/dist/cdc/index.js +3 -3
- package/dist/{chunk-CSLEDEPV.js → chunk-4DIS4RY7.js} +4 -4
- package/dist/{chunk-4JIFOE3T.js → chunk-4NB7PQ62.js} +2 -2
- package/dist/{chunk-4NK6I54V.js → chunk-CRC4XO47.js} +2 -2
- package/dist/{chunk-VVJQPZ75.js → chunk-LGTNDCBI.js} +17 -1
- package/dist/{chunk-FJV2GOIJ.js → chunk-OVTNN7FF.js} +4 -2
- package/dist/{chunk-F6U7O6BC.js → chunk-XVOJUIU6.js} +1 -1
- package/dist/cli.js +5 -5
- package/dist/index.js +3 -3
- package/dist/internal/index.js +4 -4
- package/dist/spec/index.js +5 -5
- package/dist/testing/index.js +3 -3
- package/dist/transform/index.js +1 -1
- package/package.json +1 -1
package/dist/cdc/index.js
CHANGED
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
createMaintenanceDrainHandler,
|
|
9
9
|
hashString,
|
|
10
10
|
shardIdFor
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-CRC4XO47.js";
|
|
12
12
|
import {
|
|
13
13
|
buildSubscribeHandler,
|
|
14
14
|
parseChange
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
} from "../chunk-XVOJUIU6.js";
|
|
16
|
+
import "../chunk-LGTNDCBI.js";
|
|
17
17
|
import "../chunk-XTWXMOHD.js";
|
|
18
18
|
export {
|
|
19
19
|
CdcEmulator,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
PREPARED_FORMAT_VERSION,
|
|
3
3
|
buildManifest,
|
|
4
4
|
entityFingerprint
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4NB7PQ62.js";
|
|
6
6
|
import {
|
|
7
7
|
analyzeWriteRoute,
|
|
8
8
|
assertBundleSerializable,
|
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
isContractKeyRef,
|
|
22
22
|
isContractParamRef,
|
|
23
23
|
isQueryModelContract
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-OVTNN7FF.js";
|
|
25
25
|
import {
|
|
26
26
|
detectRelationFields,
|
|
27
27
|
isInlineSnapshotSpec,
|
|
28
28
|
normalizeSelectSpec
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-XVOJUIU6.js";
|
|
30
30
|
import {
|
|
31
31
|
EXPR_VERSION,
|
|
32
32
|
MARKER_ROW_ENTITY,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
isRawCondition,
|
|
47
47
|
param,
|
|
48
48
|
resolveModelClass
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-LGTNDCBI.js";
|
|
50
50
|
import {
|
|
51
51
|
TableMapping,
|
|
52
52
|
isColumn,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
evaluateKey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OVTNN7FF.js";
|
|
4
4
|
import {
|
|
5
5
|
SPEC_VERSION_KEY_EXPR
|
|
6
6
|
} from "./chunk-WOFRHRXY.js";
|
|
7
7
|
import {
|
|
8
8
|
MetadataRegistry
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LGTNDCBI.js";
|
|
10
10
|
import {
|
|
11
11
|
TableMapping
|
|
12
12
|
} from "./chunk-XTWXMOHD.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildMaintenanceGraph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XVOJUIU6.js";
|
|
4
4
|
import {
|
|
5
5
|
ChangeCaptureRegistry,
|
|
6
6
|
ClientManager,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
buildDeleteInput,
|
|
10
10
|
buildPutInput,
|
|
11
11
|
resolveModelClass
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LGTNDCBI.js";
|
|
13
13
|
|
|
14
14
|
// src/cdc/prng.ts
|
|
15
15
|
var SeededRandom = class {
|
|
@@ -2105,6 +2105,19 @@ function buildUpdateInput(modelClass, entity, changes, options) {
|
|
|
2105
2105
|
values,
|
|
2106
2106
|
options
|
|
2107
2107
|
);
|
|
2108
|
+
const keySourceSetClauses = [];
|
|
2109
|
+
if (!options?.addOnly) {
|
|
2110
|
+
meta.primaryKey.inputFieldNames.forEach((fieldName, i) => {
|
|
2111
|
+
const raw = entity[fieldName];
|
|
2112
|
+
if (raw === void 0) return;
|
|
2113
|
+
const nameKey = `#ks${i}`;
|
|
2114
|
+
const valueKey = `:ks${i}`;
|
|
2115
|
+
const fieldMeta = fieldMap.get(fieldName);
|
|
2116
|
+
names[nameKey] = fieldName;
|
|
2117
|
+
values[valueKey] = fieldMeta ? serializeFieldValue(raw, fieldMeta) : raw;
|
|
2118
|
+
keySourceSetClauses.push(`${nameKey} = ${valueKey}`);
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2108
2121
|
let conditionExpression;
|
|
2109
2122
|
if (options?.condition) {
|
|
2110
2123
|
const condResult = buildConditionExpression(options.condition);
|
|
@@ -2112,7 +2125,10 @@ function buildUpdateInput(modelClass, entity, changes, options) {
|
|
|
2112
2125
|
Object.assign(names, condResult.names);
|
|
2113
2126
|
Object.assign(values, condResult.values);
|
|
2114
2127
|
}
|
|
2115
|
-
const setPortion = appendSetClauses(updateResult.expression,
|
|
2128
|
+
const setPortion = appendSetClauses(updateResult.expression, [
|
|
2129
|
+
...gsiSetClauses,
|
|
2130
|
+
...keySourceSetClauses
|
|
2131
|
+
]);
|
|
2116
2132
|
const addPortion = addClauses.length > 0 ? `ADD ${addClauses.join(", ")}` : "";
|
|
2117
2133
|
const updateExpression = [setPortion, addPortion].filter((s) => s !== "").join(" ");
|
|
2118
2134
|
const updateInput = {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
normalizeTopLevelSelect,
|
|
18
18
|
parseChange,
|
|
19
19
|
validateInlineSnapshotSelect
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XVOJUIU6.js";
|
|
21
21
|
import {
|
|
22
22
|
EXPR_VERSION,
|
|
23
23
|
MARKER_ROW_ENTITY,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
serializeFieldValue,
|
|
62
62
|
serializeRawCondition,
|
|
63
63
|
skTemplate
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-LGTNDCBI.js";
|
|
65
65
|
import {
|
|
66
66
|
TableMapping,
|
|
67
67
|
createColumnMap,
|
|
@@ -2554,6 +2554,8 @@ async function executeSingleWrite(w, retry) {
|
|
|
2554
2554
|
if (!isConditionalCheckFailure(e)) throw e;
|
|
2555
2555
|
const fallbackOptions = {
|
|
2556
2556
|
add: w.add,
|
|
2557
|
+
addOnly: true,
|
|
2558
|
+
// #333: skip the key-source SET (row already exists here)
|
|
2557
2559
|
...retry !== void 0 ? { retry } : {}
|
|
2558
2560
|
};
|
|
2559
2561
|
await executeUpdate(w.modelClass, w.key, {}, fallbackOptions);
|
package/dist/cli.js
CHANGED
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
buildOperations,
|
|
5
5
|
portableIrDocument,
|
|
6
6
|
renderKeyExprToTemplate
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4DIS4RY7.js";
|
|
8
8
|
import {
|
|
9
9
|
buildManifest
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-4NB7PQ62.js";
|
|
11
|
+
import "./chunk-OVTNN7FF.js";
|
|
12
|
+
import "./chunk-XVOJUIU6.js";
|
|
13
13
|
import "./chunk-WOFRHRXY.js";
|
|
14
14
|
import {
|
|
15
15
|
MetadataRegistry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LGTNDCBI.js";
|
|
17
17
|
import {
|
|
18
18
|
createDefaultLinter
|
|
19
19
|
} from "./chunk-XTWXMOHD.js";
|
package/dist/index.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
mutate,
|
|
4
4
|
publishCommand,
|
|
5
5
|
publishQuery
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OVTNN7FF.js";
|
|
7
7
|
import {
|
|
8
8
|
entityWrites,
|
|
9
9
|
getEntityWrites,
|
|
10
10
|
identity,
|
|
11
11
|
preview
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XVOJUIU6.js";
|
|
13
13
|
import {
|
|
14
14
|
when
|
|
15
15
|
} from "./chunk-WOFRHRXY.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
deriveContractEffect,
|
|
23
23
|
gsi,
|
|
24
24
|
param
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LGTNDCBI.js";
|
|
26
26
|
import {
|
|
27
27
|
TableMapping,
|
|
28
28
|
k,
|
package/dist/internal/index.js
CHANGED
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
PREPARED_FORMAT_VERSION,
|
|
3
3
|
buildManifestEntity,
|
|
4
4
|
entityFingerprint
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-4NB7PQ62.js";
|
|
6
6
|
import {
|
|
7
7
|
LOGICAL_EFFECT_CATEGORIES,
|
|
8
8
|
PreparedReadStatement,
|
|
9
9
|
executeLogicalParallelWrites,
|
|
10
10
|
executeLogicalWriteOps,
|
|
11
11
|
serializeEffectParams
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-OVTNN7FF.js";
|
|
13
|
+
import "../chunk-XVOJUIU6.js";
|
|
14
14
|
import {
|
|
15
15
|
MARKER_ROW_ENTITY,
|
|
16
16
|
SPEC_VERSION_KEY_EXPR,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
buildConditionExpression,
|
|
22
22
|
execItemKeySignature,
|
|
23
23
|
resolveConditionTree
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-LGTNDCBI.js";
|
|
25
25
|
import {
|
|
26
26
|
TableMapping
|
|
27
27
|
} from "../chunk-XTWXMOHD.js";
|
package/dist/spec/index.js
CHANGED
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
collectContractN1Violations,
|
|
15
15
|
compilePreparedPlan,
|
|
16
16
|
portableIrDocument
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-4DIS4RY7.js";
|
|
18
18
|
import {
|
|
19
19
|
PREPARED_FORMAT_VERSION,
|
|
20
20
|
buildManifest,
|
|
21
21
|
canonicalJson,
|
|
22
22
|
entityFingerprint,
|
|
23
23
|
planFingerprint
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-4NB7PQ62.js";
|
|
25
25
|
import {
|
|
26
26
|
MAX_TRANSACT_COMPOSE_ITEMS,
|
|
27
27
|
assertBundleSerializable,
|
|
@@ -36,8 +36,8 @@ import {
|
|
|
36
36
|
resetMaintenanceGraphCache,
|
|
37
37
|
resolveLifecycle,
|
|
38
38
|
resolveMaintainers
|
|
39
|
-
} from "../chunk-
|
|
40
|
-
import "../chunk-
|
|
39
|
+
} from "../chunk-OVTNN7FF.js";
|
|
40
|
+
import "../chunk-XVOJUIU6.js";
|
|
41
41
|
import {
|
|
42
42
|
EXPR_VERSION,
|
|
43
43
|
SPEC_VERSION,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
canonicalizeExpressionSpec,
|
|
48
48
|
operationsSpecVersion
|
|
49
49
|
} from "../chunk-WOFRHRXY.js";
|
|
50
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-LGTNDCBI.js";
|
|
51
51
|
import "../chunk-XTWXMOHD.js";
|
|
52
52
|
export {
|
|
53
53
|
EXPR_VERSION,
|
package/dist/testing/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCdcEmulator
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-CRC4XO47.js";
|
|
4
|
+
import "../chunk-XVOJUIU6.js";
|
|
5
5
|
import {
|
|
6
6
|
ClientManager,
|
|
7
7
|
MetadataRegistry,
|
|
8
8
|
resolveModelClass
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-LGTNDCBI.js";
|
|
10
10
|
import {
|
|
11
11
|
TableMapping
|
|
12
12
|
} from "../chunk-XTWXMOHD.js";
|
package/dist/transform/index.js
CHANGED