@infra-blocks/aws-dynamodb 0.27.0 → 0.28.0-alpha.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/lib/cjs/commands/expressions/condition/condition.d.ts +3 -3
- package/lib/cjs/commands/expressions/condition/functions.d.ts +8 -8
- package/lib/cjs/commands/expressions/condition/functions.js.map +1 -1
- package/lib/cjs/commands/expressions/condition/size.d.ts +5 -5
- package/lib/cjs/commands/expressions/condition/size.js.map +1 -1
- package/lib/cjs/commands/expressions/operands/path.d.ts +4 -4
- package/lib/cjs/commands/expressions/operands/path.js +6 -6
- package/lib/cjs/commands/expressions/operands/path.js.map +1 -1
- package/lib/cjs/commands/expressions/operands/type.d.ts +3 -3
- package/lib/cjs/commands/expressions/operands/value.d.ts +4 -4
- package/lib/cjs/commands/expressions/operands/value.js +6 -6
- package/lib/cjs/commands/expressions/operands/value.js.map +1 -1
- package/lib/cjs/commands/expressions/update/add.d.ts +5 -5
- package/lib/cjs/commands/expressions/update/add.js.map +1 -1
- package/lib/cjs/commands/expressions/update/delete.d.ts +5 -5
- package/lib/cjs/commands/expressions/update/delete.js.map +1 -1
- package/lib/cjs/commands/expressions/update/if-not-exists.d.ts +3 -3
- package/lib/cjs/commands/expressions/update/if-not-exists.js.map +1 -1
- package/lib/cjs/commands/expressions/update/remove.d.ts +3 -3
- package/lib/cjs/commands/expressions/update/remove.js.map +1 -1
- package/lib/cjs/commands/expressions/update/set.d.ts +4 -4
- package/lib/cjs/commands/expressions/update/set.js.map +1 -1
- package/lib/esm/commands/expressions/condition/condition.d.ts +3 -3
- package/lib/esm/commands/expressions/condition/functions.d.ts +8 -8
- package/lib/esm/commands/expressions/condition/functions.js.map +1 -1
- package/lib/esm/commands/expressions/condition/size.d.ts +5 -5
- package/lib/esm/commands/expressions/condition/size.js.map +1 -1
- package/lib/esm/commands/expressions/operands/path.d.ts +4 -4
- package/lib/esm/commands/expressions/operands/path.js +4 -4
- package/lib/esm/commands/expressions/operands/path.js.map +1 -1
- package/lib/esm/commands/expressions/operands/type.d.ts +3 -3
- package/lib/esm/commands/expressions/operands/value.d.ts +4 -4
- package/lib/esm/commands/expressions/operands/value.js +4 -4
- package/lib/esm/commands/expressions/operands/value.js.map +1 -1
- package/lib/esm/commands/expressions/update/add.d.ts +5 -5
- package/lib/esm/commands/expressions/update/add.js.map +1 -1
- package/lib/esm/commands/expressions/update/delete.d.ts +5 -5
- package/lib/esm/commands/expressions/update/delete.js.map +1 -1
- package/lib/esm/commands/expressions/update/if-not-exists.d.ts +3 -3
- package/lib/esm/commands/expressions/update/if-not-exists.js.map +1 -1
- package/lib/esm/commands/expressions/update/remove.d.ts +3 -3
- package/lib/esm/commands/expressions/update/remove.js.map +1 -1
- package/lib/esm/commands/expressions/update/set.d.ts +4 -4
- package/lib/esm/commands/expressions/update/set.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,13 +2,13 @@ import type { AttributeValue } from "../../../types.js";
|
|
|
2
2
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
3
3
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
4
4
|
import type { IExpression } from "../expression.js";
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
5
|
+
import type { Path } from "../operands/path.js";
|
|
6
|
+
import type { Value } from "../operands/value.js";
|
|
7
7
|
import type { ConditionComparisonParams } from "./comparisons.js";
|
|
8
8
|
import { type ConditionExpression } from "./expression.js";
|
|
9
9
|
import type { Size } from "./size.js";
|
|
10
10
|
export type ConditionParams = ConditionExpression | ConditionComparisonParams | ConditionExpression;
|
|
11
|
-
export type ConditionOperand<T extends AttributeValue = AttributeValue> =
|
|
11
|
+
export type ConditionOperand<T extends AttributeValue = AttributeValue> = Path | Value<T> | Size;
|
|
12
12
|
export declare class Condition implements IExpression {
|
|
13
13
|
private readonly inner;
|
|
14
14
|
private constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NativeBinary, NativeString, NativeType } from "../../../types.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { Path } from "../operands/path.js";
|
|
3
|
+
import type { Value } from "../operands/value.js";
|
|
4
4
|
import { ConditionExpression } from "./expression.js";
|
|
5
5
|
import type { Size } from "./size.js";
|
|
6
6
|
/**
|
|
@@ -11,7 +11,7 @@ import type { Size } from "./size.js";
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions
|
|
13
13
|
*/
|
|
14
|
-
export declare function attributeExists(attribute:
|
|
14
|
+
export declare function attributeExists(attribute: Path): ConditionExpression;
|
|
15
15
|
/**
|
|
16
16
|
* Returns a condition that uses the `attribute_not_exists` function.
|
|
17
17
|
*
|
|
@@ -20,7 +20,7 @@ export declare function attributeExists(attribute: PathOperand): ConditionExpres
|
|
|
20
20
|
*
|
|
21
21
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions
|
|
22
22
|
*/
|
|
23
|
-
export declare function attributeNotExists(attribute:
|
|
23
|
+
export declare function attributeNotExists(attribute: Path): ConditionExpression;
|
|
24
24
|
/**
|
|
25
25
|
* Returns a condition that uses the `attribute_type` function.
|
|
26
26
|
*
|
|
@@ -31,13 +31,13 @@ export declare function attributeNotExists(attribute: PathOperand): ConditionExp
|
|
|
31
31
|
*
|
|
32
32
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions
|
|
33
33
|
*/
|
|
34
|
-
export declare function attributeType(attribute:
|
|
34
|
+
export declare function attributeType(attribute: Path, type: Value<NativeType>): ConditionExpression;
|
|
35
35
|
/**
|
|
36
36
|
* This type aggregates the types of operands that can be used with the {@link beginsWith} function.
|
|
37
37
|
*
|
|
38
38
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions
|
|
39
39
|
*/
|
|
40
|
-
export type BeginsWithOperand =
|
|
40
|
+
export type BeginsWithOperand = Path | Value<NativeString | NativeBinary>;
|
|
41
41
|
/**
|
|
42
42
|
* Returns a condition that uses the `begins_with` function.
|
|
43
43
|
*
|
|
@@ -52,11 +52,11 @@ export declare function beginsWith(first: BeginsWithOperand, second: BeginsWithO
|
|
|
52
52
|
/**
|
|
53
53
|
* This type aggregates the types of operands that can be used as the first operand of the {@link contains} function.
|
|
54
54
|
*/
|
|
55
|
-
export type ContainsFirstOperand =
|
|
55
|
+
export type ContainsFirstOperand = Path | Value;
|
|
56
56
|
/**
|
|
57
57
|
* This type aggregates the types of operands that can be used as the second operand of the {@link contains} function.
|
|
58
58
|
*/
|
|
59
|
-
export type ContainsSecondOperand =
|
|
59
|
+
export type ContainsSecondOperand = Path | Value | Size;
|
|
60
60
|
/**
|
|
61
61
|
* Returns a condition that uses the `contains` function.
|
|
62
62
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/condition/functions.ts"],"names":[],"mappings":";;AAcA,0CAKC;AAUD,
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/condition/functions.ts"],"names":[],"mappings":";;AAcA,0CAKC;AAUD,gDAKC;AAYD,sCAQC;AAmBD,gCAQC;AAqBD,4BAQC;AA3GD,mDAAsD;AAGtD;;;;;;;GAOG;AACH,SAAgB,eAAe,CAAC,SAAe;IAC7C,OAAO,mCAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACvB,oBAAoB,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG;KACzD,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,SAAe;IAChD,OAAO,mCAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACvB,wBAAwB,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG;KAC7D,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,aAAa,CAC3B,SAAe,EACf,IAAuB;IAEvB,OAAO,mCAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAC/B,kBAAkB,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG;KACvF,CAAC,CAAC;AACL,CAAC;AASD;;;;;;;;;GASG;AACH,SAAgB,UAAU,CACxB,KAAwB,EACxB,MAAyB;IAEzB,OAAO,mCAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAC/B,eAAe,KAAK,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG;KACjG,CAAC,CAAC;AACL,CAAC;AAWD;;;;;;;;;GASG;AACH,SAAgB,QAAQ,CACtB,KAA2B,EAC3B,MAA6B;IAE7B,OAAO,mCAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAC/B,YAAY,KAAK,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG;KAC9F,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { NativeBinary, NativeList, NativeMap, NativeSet, NativeString } from "../../../types.js";
|
|
2
2
|
import type { AttributeNames, AttributeValues } from "../../attributes/index.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Path } from "../operands/path.js";
|
|
4
4
|
import type { IOperand } from "../operands/type.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { Value } from "../operands/value.js";
|
|
6
6
|
/**
|
|
7
7
|
* This type aggregates the types of operands that can be used with the {@link size} function.
|
|
8
8
|
*
|
|
9
9
|
* @see size
|
|
10
|
-
* @see
|
|
11
|
-
* @see
|
|
10
|
+
* @see Path
|
|
11
|
+
* @see Value
|
|
12
12
|
*/
|
|
13
|
-
export type SizeOperand =
|
|
13
|
+
export type SizeOperand = Path | Value<NativeBinary | NativeList | NativeMap | NativeSet | NativeString>;
|
|
14
14
|
/**
|
|
15
15
|
* A type representing the result of the {@link size} function as an operand to be used in expressions.
|
|
16
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/condition/size.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/condition/size.ts"],"names":[],"mappings":";;;AA2DA,oBAEC;AAnCD;;GAEG;AACH,MAAa,IAAI;IACE,KAAK,CAAc;IAEpC,YAAY,OAAoB;QAC9B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAED,UAAU,CAAC,MAGV;QACC,OAAO,QAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,OAAoB;QAC9B,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;CACF;AApBD,oBAoBC;AAED;;;;;;;GAOG;AACH,SAAgB,IAAI,CAAC,OAAoB;IACvC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -8,7 +8,7 @@ import type { IOperand } from "./type.js";
|
|
|
8
8
|
* attribute path in the {@link AttributeNames} registry and substitutes
|
|
9
9
|
* it with the returned value.
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class Path implements IOperand {
|
|
12
12
|
private readonly path;
|
|
13
13
|
constructor(path: AttributePath);
|
|
14
14
|
substitute(params: {
|
|
@@ -16,10 +16,10 @@ export declare class PathOperand implements IOperand {
|
|
|
16
16
|
}): string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Factory function to create a {@link
|
|
19
|
+
* Factory function to create a {@link Path}.
|
|
20
20
|
*
|
|
21
21
|
* @param path - The path of the attribute this operand represents.
|
|
22
22
|
*
|
|
23
|
-
* @returns A new {@link
|
|
23
|
+
* @returns A new {@link Path} instance for the provided path.
|
|
24
24
|
*/
|
|
25
|
-
export declare function path(path: AttributePath):
|
|
25
|
+
export declare function path(path: AttributePath): Path;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Path = void 0;
|
|
4
4
|
exports.path = path;
|
|
5
5
|
/**
|
|
6
6
|
* Represents an attribute path operand in an expression.
|
|
@@ -9,7 +9,7 @@ exports.path = path;
|
|
|
9
9
|
* attribute path in the {@link AttributeNames} registry and substitutes
|
|
10
10
|
* it with the returned value.
|
|
11
11
|
*/
|
|
12
|
-
class
|
|
12
|
+
class Path {
|
|
13
13
|
path;
|
|
14
14
|
constructor(path) {
|
|
15
15
|
this.path = path;
|
|
@@ -19,15 +19,15 @@ class PathOperand {
|
|
|
19
19
|
return names.substitute(this.path);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
exports.
|
|
22
|
+
exports.Path = Path;
|
|
23
23
|
/**
|
|
24
|
-
* Factory function to create a {@link
|
|
24
|
+
* Factory function to create a {@link Path}.
|
|
25
25
|
*
|
|
26
26
|
* @param path - The path of the attribute this operand represents.
|
|
27
27
|
*
|
|
28
|
-
* @returns A new {@link
|
|
28
|
+
* @returns A new {@link Path} instance for the provided path.
|
|
29
29
|
*/
|
|
30
30
|
function path(path) {
|
|
31
|
-
return new
|
|
31
|
+
return new Path(path);
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/path.ts"],"names":[],"mappings":";;;AA+BA,oBAEC;AA7BD;;;;;;GAMG;AACH,MAAa,
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/path.ts"],"names":[],"mappings":";;;AA+BA,oBAEC;AA7BD;;;;;;GAMG;AACH,MAAa,IAAI;IACE,IAAI,CAAgB;IAErC,YAAY,IAAmB;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,UAAU,CAAC,MAAiC;QAC1C,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACzB,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACF;AAXD,oBAWC;AAED;;;;;;GAMG;AACH,SAAgB,IAAI,CAAC,IAAmB;IACtC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AttributeValue } from "../../../types.js";
|
|
2
2
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
3
3
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
export type Operand<T extends AttributeValue = AttributeValue> =
|
|
4
|
+
import type { Path } from "./path.js";
|
|
5
|
+
import type { Value } from "./value.js";
|
|
6
|
+
export type Operand<T extends AttributeValue = AttributeValue> = Path | Value<T>;
|
|
7
7
|
export interface IOperand {
|
|
8
8
|
substitute(params: {
|
|
9
9
|
names: AttributeNames;
|
|
@@ -8,7 +8,7 @@ import type { IOperand } from "./type.js";
|
|
|
8
8
|
* value in the {@link AttributeValues} registry and substitutes
|
|
9
9
|
* it with the returned value.
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class Value<T extends AttributeValue = AttributeValue> implements IOperand {
|
|
12
12
|
private readonly value;
|
|
13
13
|
constructor(value: T);
|
|
14
14
|
substitute(params: {
|
|
@@ -16,10 +16,10 @@ export declare class ValueOperand<T extends AttributeValue = AttributeValue> imp
|
|
|
16
16
|
}): string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Factory function to create a {@link
|
|
19
|
+
* Factory function to create a {@link Value}.
|
|
20
20
|
*
|
|
21
21
|
* @param value - The value this operand represents.
|
|
22
22
|
*
|
|
23
|
-
* @returns A new {@link
|
|
23
|
+
* @returns A new {@link Value} instance for the provided value.
|
|
24
24
|
*/
|
|
25
|
-
export declare function value<T extends AttributeValue = AttributeValue>(value: T):
|
|
25
|
+
export declare function value<T extends AttributeValue = AttributeValue>(value: T): Value<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Value = void 0;
|
|
4
4
|
exports.value = value;
|
|
5
5
|
/**
|
|
6
6
|
* Represents a value operand in an expression.
|
|
@@ -9,7 +9,7 @@ exports.value = value;
|
|
|
9
9
|
* value in the {@link AttributeValues} registry and substitutes
|
|
10
10
|
* it with the returned value.
|
|
11
11
|
*/
|
|
12
|
-
class
|
|
12
|
+
class Value {
|
|
13
13
|
value;
|
|
14
14
|
constructor(value) {
|
|
15
15
|
this.value = value;
|
|
@@ -19,15 +19,15 @@ class ValueOperand {
|
|
|
19
19
|
return values.substitute(this.value);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
exports.
|
|
22
|
+
exports.Value = Value;
|
|
23
23
|
/**
|
|
24
|
-
* Factory function to create a {@link
|
|
24
|
+
* Factory function to create a {@link Value}.
|
|
25
25
|
*
|
|
26
26
|
* @param value - The value this operand represents.
|
|
27
27
|
*
|
|
28
|
-
* @returns A new {@link
|
|
28
|
+
* @returns A new {@link Value} instance for the provided value.
|
|
29
29
|
*/
|
|
30
30
|
function value(value) {
|
|
31
|
-
return new
|
|
31
|
+
return new Value(value);
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/value.ts"],"names":[],"mappings":";;;AAiCA,sBAIC;AAjCD;;;;;;GAMG;AACH,MAAa,
|
|
1
|
+
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/value.ts"],"names":[],"mappings":";;;AAiCA,sBAIC;AAjCD;;;;;;GAMG;AACH,MAAa,KAAK;IAGC,KAAK,CAAI;IAE1B,YAAY,KAAQ;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,UAAU,CAAC,MAAmC;QAC5C,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAC1B,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;CACF;AAbD,sBAaC;AAED;;;;;;GAMG;AACH,SAAgB,KAAK,CACnB,KAAQ;IAER,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NativeNumber, NativeSet } from "../../../types.js";
|
|
2
2
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
3
3
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
4
|
+
import type { Path } from "../operands/path.js";
|
|
5
|
+
import type { Value } from "../operands/value.js";
|
|
6
6
|
import type { IUpdateAction, UpdateAction } from "./action.js";
|
|
7
7
|
import type { UpdateExpressionClauses } from "./clauses.js";
|
|
8
8
|
type NumberOrSet = NativeNumber | NativeSet;
|
|
@@ -16,8 +16,8 @@ export declare class AddAction implements IUpdateAction {
|
|
|
16
16
|
values: AttributeValues;
|
|
17
17
|
}): string;
|
|
18
18
|
static from(params: {
|
|
19
|
-
path:
|
|
20
|
-
value:
|
|
19
|
+
path: Path;
|
|
20
|
+
value: Value<NumberOrSet>;
|
|
21
21
|
}): AddAction;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
@@ -36,5 +36,5 @@ export declare class AddAction implements IUpdateAction {
|
|
|
36
36
|
*
|
|
37
37
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.ADD
|
|
38
38
|
*/
|
|
39
|
-
export declare function add(path:
|
|
39
|
+
export declare function add(path: Path, value: Value<NumberOrSet>): UpdateAction;
|
|
40
40
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/add.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/add.ts"],"names":[],"mappings":";;;AA0DA,kBAEC;AAlDD,iGAAiG;AACjG,MAAa,SAAS;IACH,IAAI,CAAO;IACX,KAAK,CAAqB;IAE3C,YAAoB,MAGnB;QACC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,CAAC,MAGT;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACnF,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAiD;QAC3D,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AA5BD,8BA4BC;AAED;;;;;;;;;;;;;;;GAeG;AAEH,SAAgB,GAAG,CAAC,IAAU,EAAE,KAAyB;IACvD,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NativeSet } from "../../../types.js";
|
|
2
2
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
3
3
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
4
|
+
import type { Path } from "../operands/path.js";
|
|
5
|
+
import type { Value } from "../operands/value.js";
|
|
6
6
|
import type { IUpdateAction, UpdateAction } from "./action.js";
|
|
7
7
|
import type { UpdateExpressionClauses } from "./clauses.js";
|
|
8
8
|
export declare class DeleteAction implements IUpdateAction {
|
|
@@ -15,8 +15,8 @@ export declare class DeleteAction implements IUpdateAction {
|
|
|
15
15
|
values: AttributeValues;
|
|
16
16
|
}): string;
|
|
17
17
|
static from(params: {
|
|
18
|
-
path:
|
|
19
|
-
value:
|
|
18
|
+
path: Path;
|
|
19
|
+
value: Value<NativeSet>;
|
|
20
20
|
}): DeleteAction;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -32,4 +32,4 @@ export declare class DeleteAction implements IUpdateAction {
|
|
|
32
32
|
*
|
|
33
33
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.DELETE
|
|
34
34
|
*/
|
|
35
|
-
export declare function deleteFrom(path:
|
|
35
|
+
export declare function deleteFrom(path: Path, value: Value<NativeSet>): UpdateAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/delete.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/delete.ts"],"names":[],"mappings":";;;AAsDA,gCAEC;AAhDD,MAAa,YAAY;IACN,IAAI,CAAO;IACX,KAAK,CAAmB;IAEzC,YAAoB,MAGnB;QACC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,CAAC,MAGT;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;YACjE,MAAM;SACP,CAAC,EAAE,CAAC;IACP,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAA+C;QACzD,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;CACF;AA9BD,oCA8BC;AAED;;;;;;;;;;;;GAYG;AAEH,SAAgB,UAAU,CAAC,IAAU,EAAE,KAAuB;IAC5D,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
2
2
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Path } from "../operands/path.js";
|
|
4
4
|
import type { IOperand, Operand } from "../operands/type.js";
|
|
5
5
|
export declare class IfNotExistsOperand implements IOperand {
|
|
6
6
|
private readonly path;
|
|
7
7
|
private readonly defaultValue;
|
|
8
8
|
constructor(params: {
|
|
9
|
-
path:
|
|
9
|
+
path: Path;
|
|
10
10
|
defaultValue: Operand;
|
|
11
11
|
});
|
|
12
12
|
substitute(params: {
|
|
@@ -14,4 +14,4 @@ export declare class IfNotExistsOperand implements IOperand {
|
|
|
14
14
|
values: AttributeValues;
|
|
15
15
|
}): string;
|
|
16
16
|
}
|
|
17
|
-
export declare function ifNotExists(path:
|
|
17
|
+
export declare function ifNotExists(path: Path, defaultValue: Operand): IfNotExistsOperand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"if-not-exists.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/if-not-exists.ts"],"names":[],"mappings":";;;AAwBA,kCAKC;AAxBD,MAAa,kBAAkB;IACZ,IAAI,
|
|
1
|
+
{"version":3,"file":"if-not-exists.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/if-not-exists.ts"],"names":[],"mappings":";;;AAwBA,kCAKC;AAxBD,MAAa,kBAAkB;IACZ,IAAI,CAAO;IACX,YAAY,CAAU;IAEvC,YAAY,MAA6C;QACvD,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED,UAAU,CAAC,MAGV;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,iBAAiB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC;IACjH,CAAC;CACF;AAjBD,gDAiBC;AAED,SAAgB,WAAW,CACzB,IAAU,EACV,YAAqB;IAErB,OAAO,IAAI,kBAAkB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Path } from "../operands/path.js";
|
|
3
3
|
import type { IUpdateAction, UpdateAction } from "./action.js";
|
|
4
4
|
import type { UpdateExpressionClauses } from "./clauses.js";
|
|
5
5
|
export declare class RemoveAction implements IUpdateAction {
|
|
@@ -9,7 +9,7 @@ export declare class RemoveAction implements IUpdateAction {
|
|
|
9
9
|
stringify(params: {
|
|
10
10
|
names: AttributeNames;
|
|
11
11
|
}): string;
|
|
12
|
-
static from(path:
|
|
12
|
+
static from(path: Path): RemoveAction;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Returns an action that will remove the specific attribute at the provided path.
|
|
@@ -20,4 +20,4 @@ export declare class RemoveAction implements IUpdateAction {
|
|
|
20
20
|
*
|
|
21
21
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.DELETE
|
|
22
22
|
*/
|
|
23
|
-
export declare function remove(path:
|
|
23
|
+
export declare function remove(path: Path): UpdateAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/remove.ts"],"names":[],"mappings":";;;AAmCA,wBAEC;AAhCD,MAAa,YAAY;IACN,IAAI,
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/remove.ts"],"names":[],"mappings":";;;AAmCA,wBAEC;AAhCD,MAAa,YAAY;IACN,IAAI,CAAO;IAE5B,YAAoB,IAAU;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,CAAC,MAAiC;QACzC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAAU;QACpB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAnBD,oCAmBC;AAED;;;;;;;;GAQG;AACH,SAAgB,MAAM,CAAC,IAAU;IAC/B,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
2
2
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Path } from "../operands/path.js";
|
|
4
4
|
import type { Operand } from "../operands/type.js";
|
|
5
5
|
import type { IUpdateAction, UpdateAction } from "./action.js";
|
|
6
6
|
import type { UpdateExpressionClauses } from "./clauses.js";
|
|
@@ -9,7 +9,7 @@ export type SetOperand = Operand | IfNotExistsOperand;
|
|
|
9
9
|
export type SetOperator = "+" | "-";
|
|
10
10
|
type SetActionParams = SetToParams | SetToExpressionParams;
|
|
11
11
|
type SetToParams = {
|
|
12
|
-
path:
|
|
12
|
+
path: Path;
|
|
13
13
|
operand: SetOperand;
|
|
14
14
|
};
|
|
15
15
|
type SetToExpressionParams = SetToParams & {
|
|
@@ -26,6 +26,6 @@ export declare class SetAction implements IUpdateAction {
|
|
|
26
26
|
}): string;
|
|
27
27
|
static from(params: SetActionParams): SetAction;
|
|
28
28
|
}
|
|
29
|
-
export declare function set(path:
|
|
30
|
-
export declare function set(path:
|
|
29
|
+
export declare function set(path: Path, operand: SetOperand): UpdateAction;
|
|
30
|
+
export declare function set(path: Path, operand: SetOperand, operator: SetOperator, secondOperand: SetOperand): UpdateAction;
|
|
31
31
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/set.ts"],"names":[],"mappings":";;;AAsEA,kBAYC;AA1DD,MAAa,SAAS;IACH,MAAM,CAAkB;IAEzC,YAAoB,MAAuB;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,CAAC,MAGT;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CACxF;YACE,KAAK;YACL,MAAM;SACP,CACF,EAAE,CAAC;QACJ,IAAI,UAAU,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;YAC9D,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CACxE;gBACE,KAAK;gBACL,MAAM;aACP,CACF,EAAE,CAAC;QACN,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAuB;QACjC,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AApCD,8BAoCC;AAUD,SAAgB,GAAG,CACjB,
|
|
1
|
+
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/set.ts"],"names":[],"mappings":";;;AAsEA,kBAYC;AA1DD,MAAa,SAAS;IACH,MAAM,CAAkB;IAEzC,YAAoB,MAAuB;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,CAAC,MAGT;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CACxF;YACE,KAAK;YACL,MAAM;SACP,CACF,EAAE,CAAC;QACJ,IAAI,UAAU,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;YAC9D,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CACxE;gBACE,KAAK;gBACL,MAAM;aACP,CACF,EAAE,CAAC;QACN,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAuB;QACjC,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AApCD,8BAoCC;AAUD,SAAgB,GAAG,CACjB,IAAU,EACV,OAAmB,EACnB,QAAsB,EACtB,aAA0B;IAE1B,OAAO,SAAS,CAAC,IAAI,CAAC;QACpB,IAAI;QACJ,OAAO;QACP,QAAQ;QACR,aAAa;KACd,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -2,13 +2,13 @@ import type { AttributeValue } from "../../../types.js";
|
|
|
2
2
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
3
3
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
4
4
|
import type { IExpression } from "../expression.js";
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
5
|
+
import type { Path } from "../operands/path.js";
|
|
6
|
+
import type { Value } from "../operands/value.js";
|
|
7
7
|
import type { ConditionComparisonParams } from "./comparisons.js";
|
|
8
8
|
import { type ConditionExpression } from "./expression.js";
|
|
9
9
|
import type { Size } from "./size.js";
|
|
10
10
|
export type ConditionParams = ConditionExpression | ConditionComparisonParams | ConditionExpression;
|
|
11
|
-
export type ConditionOperand<T extends AttributeValue = AttributeValue> =
|
|
11
|
+
export type ConditionOperand<T extends AttributeValue = AttributeValue> = Path | Value<T> | Size;
|
|
12
12
|
export declare class Condition implements IExpression {
|
|
13
13
|
private readonly inner;
|
|
14
14
|
private constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NativeBinary, NativeString, NativeType } from "../../../types.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { Path } from "../operands/path.js";
|
|
3
|
+
import type { Value } from "../operands/value.js";
|
|
4
4
|
import { ConditionExpression } from "./expression.js";
|
|
5
5
|
import type { Size } from "./size.js";
|
|
6
6
|
/**
|
|
@@ -11,7 +11,7 @@ import type { Size } from "./size.js";
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions
|
|
13
13
|
*/
|
|
14
|
-
export declare function attributeExists(attribute:
|
|
14
|
+
export declare function attributeExists(attribute: Path): ConditionExpression;
|
|
15
15
|
/**
|
|
16
16
|
* Returns a condition that uses the `attribute_not_exists` function.
|
|
17
17
|
*
|
|
@@ -20,7 +20,7 @@ export declare function attributeExists(attribute: PathOperand): ConditionExpres
|
|
|
20
20
|
*
|
|
21
21
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions
|
|
22
22
|
*/
|
|
23
|
-
export declare function attributeNotExists(attribute:
|
|
23
|
+
export declare function attributeNotExists(attribute: Path): ConditionExpression;
|
|
24
24
|
/**
|
|
25
25
|
* Returns a condition that uses the `attribute_type` function.
|
|
26
26
|
*
|
|
@@ -31,13 +31,13 @@ export declare function attributeNotExists(attribute: PathOperand): ConditionExp
|
|
|
31
31
|
*
|
|
32
32
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions
|
|
33
33
|
*/
|
|
34
|
-
export declare function attributeType(attribute:
|
|
34
|
+
export declare function attributeType(attribute: Path, type: Value<NativeType>): ConditionExpression;
|
|
35
35
|
/**
|
|
36
36
|
* This type aggregates the types of operands that can be used with the {@link beginsWith} function.
|
|
37
37
|
*
|
|
38
38
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions
|
|
39
39
|
*/
|
|
40
|
-
export type BeginsWithOperand =
|
|
40
|
+
export type BeginsWithOperand = Path | Value<NativeString | NativeBinary>;
|
|
41
41
|
/**
|
|
42
42
|
* Returns a condition that uses the `begins_with` function.
|
|
43
43
|
*
|
|
@@ -52,11 +52,11 @@ export declare function beginsWith(first: BeginsWithOperand, second: BeginsWithO
|
|
|
52
52
|
/**
|
|
53
53
|
* This type aggregates the types of operands that can be used as the first operand of the {@link contains} function.
|
|
54
54
|
*/
|
|
55
|
-
export type ContainsFirstOperand =
|
|
55
|
+
export type ContainsFirstOperand = Path | Value;
|
|
56
56
|
/**
|
|
57
57
|
* This type aggregates the types of operands that can be used as the second operand of the {@link contains} function.
|
|
58
58
|
*/
|
|
59
|
-
export type ContainsSecondOperand =
|
|
59
|
+
export type ContainsSecondOperand = Path | Value | Size;
|
|
60
60
|
/**
|
|
61
61
|
* Returns a condition that uses the `contains` function.
|
|
62
62
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/condition/functions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/condition/functions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,SAAe;IAC7C,OAAO,mBAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACvB,oBAAoB,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG;KACzD,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAe;IAChD,OAAO,mBAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACvB,wBAAwB,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG;KAC7D,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAC3B,SAAe,EACf,IAAuB;IAEvB,OAAO,mBAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAC/B,kBAAkB,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG;KACvF,CAAC,CAAC;AACL,CAAC;AASD;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CACxB,KAAwB,EACxB,MAAyB;IAEzB,OAAO,mBAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAC/B,eAAe,KAAK,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG;KACjG,CAAC,CAAC;AACL,CAAC;AAWD;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CACtB,KAA2B,EAC3B,MAA6B;IAE7B,OAAO,mBAAmB,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAC/B,YAAY,KAAK,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG;KAC9F,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { NativeBinary, NativeList, NativeMap, NativeSet, NativeString } from "../../../types.js";
|
|
2
2
|
import type { AttributeNames, AttributeValues } from "../../attributes/index.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Path } from "../operands/path.js";
|
|
4
4
|
import type { IOperand } from "../operands/type.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { Value } from "../operands/value.js";
|
|
6
6
|
/**
|
|
7
7
|
* This type aggregates the types of operands that can be used with the {@link size} function.
|
|
8
8
|
*
|
|
9
9
|
* @see size
|
|
10
|
-
* @see
|
|
11
|
-
* @see
|
|
10
|
+
* @see Path
|
|
11
|
+
* @see Value
|
|
12
12
|
*/
|
|
13
|
-
export type SizeOperand =
|
|
13
|
+
export type SizeOperand = Path | Value<NativeBinary | NativeList | NativeMap | NativeSet | NativeString>;
|
|
14
14
|
/**
|
|
15
15
|
* A type representing the result of the {@link size} function as an operand to be used in expressions.
|
|
16
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/condition/size.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/condition/size.ts"],"names":[],"mappings":"AA0BA;;GAEG;AACH,MAAM,OAAO,IAAI;IACE,KAAK,CAAc;IAEpC,YAAY,OAAoB;QAC9B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAED,UAAU,CAAC,MAGV;QACC,OAAO,QAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,OAAoB;QAC9B,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,IAAI,CAAC,OAAoB;IACvC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -8,7 +8,7 @@ import type { IOperand } from "./type.js";
|
|
|
8
8
|
* attribute path in the {@link AttributeNames} registry and substitutes
|
|
9
9
|
* it with the returned value.
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class Path implements IOperand {
|
|
12
12
|
private readonly path;
|
|
13
13
|
constructor(path: AttributePath);
|
|
14
14
|
substitute(params: {
|
|
@@ -16,10 +16,10 @@ export declare class PathOperand implements IOperand {
|
|
|
16
16
|
}): string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Factory function to create a {@link
|
|
19
|
+
* Factory function to create a {@link Path}.
|
|
20
20
|
*
|
|
21
21
|
* @param path - The path of the attribute this operand represents.
|
|
22
22
|
*
|
|
23
|
-
* @returns A new {@link
|
|
23
|
+
* @returns A new {@link Path} instance for the provided path.
|
|
24
24
|
*/
|
|
25
|
-
export declare function path(path: AttributePath):
|
|
25
|
+
export declare function path(path: AttributePath): Path;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* attribute path in the {@link AttributeNames} registry and substitutes
|
|
6
6
|
* it with the returned value.
|
|
7
7
|
*/
|
|
8
|
-
export class
|
|
8
|
+
export class Path {
|
|
9
9
|
path;
|
|
10
10
|
constructor(path) {
|
|
11
11
|
this.path = path;
|
|
@@ -16,13 +16,13 @@ export class PathOperand {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Factory function to create a {@link
|
|
19
|
+
* Factory function to create a {@link Path}.
|
|
20
20
|
*
|
|
21
21
|
* @param path - The path of the attribute this operand represents.
|
|
22
22
|
*
|
|
23
|
-
* @returns A new {@link
|
|
23
|
+
* @returns A new {@link Path} instance for the provided path.
|
|
24
24
|
*/
|
|
25
25
|
export function path(path) {
|
|
26
|
-
return new
|
|
26
|
+
return new Path(path);
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/path.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/path.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,OAAO,IAAI;IACE,IAAI,CAAgB;IAErC,YAAY,IAAmB;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,UAAU,CAAC,MAAiC;QAC1C,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACzB,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAAC,IAAmB;IACtC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AttributeValue } from "../../../types.js";
|
|
2
2
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
3
3
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
export type Operand<T extends AttributeValue = AttributeValue> =
|
|
4
|
+
import type { Path } from "./path.js";
|
|
5
|
+
import type { Value } from "./value.js";
|
|
6
|
+
export type Operand<T extends AttributeValue = AttributeValue> = Path | Value<T>;
|
|
7
7
|
export interface IOperand {
|
|
8
8
|
substitute(params: {
|
|
9
9
|
names: AttributeNames;
|
|
@@ -8,7 +8,7 @@ import type { IOperand } from "./type.js";
|
|
|
8
8
|
* value in the {@link AttributeValues} registry and substitutes
|
|
9
9
|
* it with the returned value.
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class Value<T extends AttributeValue = AttributeValue> implements IOperand {
|
|
12
12
|
private readonly value;
|
|
13
13
|
constructor(value: T);
|
|
14
14
|
substitute(params: {
|
|
@@ -16,10 +16,10 @@ export declare class ValueOperand<T extends AttributeValue = AttributeValue> imp
|
|
|
16
16
|
}): string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Factory function to create a {@link
|
|
19
|
+
* Factory function to create a {@link Value}.
|
|
20
20
|
*
|
|
21
21
|
* @param value - The value this operand represents.
|
|
22
22
|
*
|
|
23
|
-
* @returns A new {@link
|
|
23
|
+
* @returns A new {@link Value} instance for the provided value.
|
|
24
24
|
*/
|
|
25
|
-
export declare function value<T extends AttributeValue = AttributeValue>(value: T):
|
|
25
|
+
export declare function value<T extends AttributeValue = AttributeValue>(value: T): Value<T>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* value in the {@link AttributeValues} registry and substitutes
|
|
6
6
|
* it with the returned value.
|
|
7
7
|
*/
|
|
8
|
-
export class
|
|
8
|
+
export class Value {
|
|
9
9
|
value;
|
|
10
10
|
constructor(value) {
|
|
11
11
|
this.value = value;
|
|
@@ -16,13 +16,13 @@ export class ValueOperand {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Factory function to create a {@link
|
|
19
|
+
* Factory function to create a {@link Value}.
|
|
20
20
|
*
|
|
21
21
|
* @param value - The value this operand represents.
|
|
22
22
|
*
|
|
23
|
-
* @returns A new {@link
|
|
23
|
+
* @returns A new {@link Value} instance for the provided value.
|
|
24
24
|
*/
|
|
25
25
|
export function value(value) {
|
|
26
|
-
return new
|
|
26
|
+
return new Value(value);
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/value.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/value.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,OAAO,KAAK;IAGC,KAAK,CAAI;IAE1B,YAAY,KAAQ;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,UAAU,CAAC,MAAmC;QAC5C,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAC1B,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CACnB,KAAQ;IAER,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NativeNumber, NativeSet } from "../../../types.js";
|
|
2
2
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
3
3
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
4
|
+
import type { Path } from "../operands/path.js";
|
|
5
|
+
import type { Value } from "../operands/value.js";
|
|
6
6
|
import type { IUpdateAction, UpdateAction } from "./action.js";
|
|
7
7
|
import type { UpdateExpressionClauses } from "./clauses.js";
|
|
8
8
|
type NumberOrSet = NativeNumber | NativeSet;
|
|
@@ -16,8 +16,8 @@ export declare class AddAction implements IUpdateAction {
|
|
|
16
16
|
values: AttributeValues;
|
|
17
17
|
}): string;
|
|
18
18
|
static from(params: {
|
|
19
|
-
path:
|
|
20
|
-
value:
|
|
19
|
+
path: Path;
|
|
20
|
+
value: Value<NumberOrSet>;
|
|
21
21
|
}): AddAction;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
@@ -36,5 +36,5 @@ export declare class AddAction implements IUpdateAction {
|
|
|
36
36
|
*
|
|
37
37
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.ADD
|
|
38
38
|
*/
|
|
39
|
-
export declare function add(path:
|
|
39
|
+
export declare function add(path: Path, value: Value<NumberOrSet>): UpdateAction;
|
|
40
40
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/add.ts"],"names":[],"mappings":"AAUA,iGAAiG;AACjG,MAAM,OAAO,SAAS;IACH,IAAI,
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/add.ts"],"names":[],"mappings":"AAUA,iGAAiG;AACjG,MAAM,OAAO,SAAS;IACH,IAAI,CAAO;IACX,KAAK,CAAqB;IAE3C,YAAoB,MAGnB;QACC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,CAAC,MAGT;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACnF,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAiD;QAC3D,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AAED;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,UAAU,GAAG,CAAC,IAAU,EAAE,KAAyB;IACvD,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NativeSet } from "../../../types.js";
|
|
2
2
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
3
3
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
4
|
+
import type { Path } from "../operands/path.js";
|
|
5
|
+
import type { Value } from "../operands/value.js";
|
|
6
6
|
import type { IUpdateAction, UpdateAction } from "./action.js";
|
|
7
7
|
import type { UpdateExpressionClauses } from "./clauses.js";
|
|
8
8
|
export declare class DeleteAction implements IUpdateAction {
|
|
@@ -15,8 +15,8 @@ export declare class DeleteAction implements IUpdateAction {
|
|
|
15
15
|
values: AttributeValues;
|
|
16
16
|
}): string;
|
|
17
17
|
static from(params: {
|
|
18
|
-
path:
|
|
19
|
-
value:
|
|
18
|
+
path: Path;
|
|
19
|
+
value: Value<NativeSet>;
|
|
20
20
|
}): DeleteAction;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -32,4 +32,4 @@ export declare class DeleteAction implements IUpdateAction {
|
|
|
32
32
|
*
|
|
33
33
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.DELETE
|
|
34
34
|
*/
|
|
35
|
-
export declare function deleteFrom(path:
|
|
35
|
+
export declare function deleteFrom(path: Path, value: Value<NativeSet>): UpdateAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/delete.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,YAAY;IACN,IAAI,
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/delete.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,YAAY;IACN,IAAI,CAAO;IACX,KAAK,CAAmB;IAEzC,YAAoB,MAGnB;QACC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,CAAC,MAGT;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;YACjE,MAAM;SACP,CAAC,EAAE,CAAC;IACP,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAA+C;QACzD,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;CACF;AAED;;;;;;;;;;;;GAYG;AAEH,MAAM,UAAU,UAAU,CAAC,IAAU,EAAE,KAAuB;IAC5D,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
2
2
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Path } from "../operands/path.js";
|
|
4
4
|
import type { IOperand, Operand } from "../operands/type.js";
|
|
5
5
|
export declare class IfNotExistsOperand implements IOperand {
|
|
6
6
|
private readonly path;
|
|
7
7
|
private readonly defaultValue;
|
|
8
8
|
constructor(params: {
|
|
9
|
-
path:
|
|
9
|
+
path: Path;
|
|
10
10
|
defaultValue: Operand;
|
|
11
11
|
});
|
|
12
12
|
substitute(params: {
|
|
@@ -14,4 +14,4 @@ export declare class IfNotExistsOperand implements IOperand {
|
|
|
14
14
|
values: AttributeValues;
|
|
15
15
|
}): string;
|
|
16
16
|
}
|
|
17
|
-
export declare function ifNotExists(path:
|
|
17
|
+
export declare function ifNotExists(path: Path, defaultValue: Operand): IfNotExistsOperand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"if-not-exists.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/if-not-exists.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,kBAAkB;IACZ,IAAI,
|
|
1
|
+
{"version":3,"file":"if-not-exists.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/if-not-exists.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,kBAAkB;IACZ,IAAI,CAAO;IACX,YAAY,CAAU;IAEvC,YAAY,MAA6C;QACvD,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED,UAAU,CAAC,MAGV;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,OAAO,iBAAiB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC;IACjH,CAAC;CACF;AAED,MAAM,UAAU,WAAW,CACzB,IAAU,EACV,YAAqB;IAErB,OAAO,IAAI,kBAAkB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Path } from "../operands/path.js";
|
|
3
3
|
import type { IUpdateAction, UpdateAction } from "./action.js";
|
|
4
4
|
import type { UpdateExpressionClauses } from "./clauses.js";
|
|
5
5
|
export declare class RemoveAction implements IUpdateAction {
|
|
@@ -9,7 +9,7 @@ export declare class RemoveAction implements IUpdateAction {
|
|
|
9
9
|
stringify(params: {
|
|
10
10
|
names: AttributeNames;
|
|
11
11
|
}): string;
|
|
12
|
-
static from(path:
|
|
12
|
+
static from(path: Path): RemoveAction;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Returns an action that will remove the specific attribute at the provided path.
|
|
@@ -20,4 +20,4 @@ export declare class RemoveAction implements IUpdateAction {
|
|
|
20
20
|
*
|
|
21
21
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.DELETE
|
|
22
22
|
*/
|
|
23
|
-
export declare function remove(path:
|
|
23
|
+
export declare function remove(path: Path): UpdateAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/remove.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,YAAY;IACN,IAAI,
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/remove.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,YAAY;IACN,IAAI,CAAO;IAE5B,YAAoB,IAAU;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,CAAC,MAAiC;QACzC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAAU;QACpB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,MAAM,CAAC,IAAU;IAC/B,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AttributeNames } from "../../attributes/names.js";
|
|
2
2
|
import type { AttributeValues } from "../../attributes/values.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Path } from "../operands/path.js";
|
|
4
4
|
import type { Operand } from "../operands/type.js";
|
|
5
5
|
import type { IUpdateAction, UpdateAction } from "./action.js";
|
|
6
6
|
import type { UpdateExpressionClauses } from "./clauses.js";
|
|
@@ -9,7 +9,7 @@ export type SetOperand = Operand | IfNotExistsOperand;
|
|
|
9
9
|
export type SetOperator = "+" | "-";
|
|
10
10
|
type SetActionParams = SetToParams | SetToExpressionParams;
|
|
11
11
|
type SetToParams = {
|
|
12
|
-
path:
|
|
12
|
+
path: Path;
|
|
13
13
|
operand: SetOperand;
|
|
14
14
|
};
|
|
15
15
|
type SetToExpressionParams = SetToParams & {
|
|
@@ -26,6 +26,6 @@ export declare class SetAction implements IUpdateAction {
|
|
|
26
26
|
}): string;
|
|
27
27
|
static from(params: SetActionParams): SetAction;
|
|
28
28
|
}
|
|
29
|
-
export declare function set(path:
|
|
30
|
-
export declare function set(path:
|
|
29
|
+
export declare function set(path: Path, operand: SetOperand): UpdateAction;
|
|
30
|
+
export declare function set(path: Path, operand: SetOperand, operator: SetOperator, secondOperand: SetOperand): UpdateAction;
|
|
31
31
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/set.ts"],"names":[],"mappings":"AAwBA,MAAM,OAAO,SAAS;IACH,MAAM,CAAkB;IAEzC,YAAoB,MAAuB;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,CAAC,MAGT;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CACxF;YACE,KAAK;YACL,MAAM;SACP,CACF,EAAE,CAAC;QACJ,IAAI,UAAU,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;YAC9D,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CACxE;gBACE,KAAK;gBACL,MAAM;aACP,CACF,EAAE,CAAC;QACN,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAuB;QACjC,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AAUD,MAAM,UAAU,GAAG,CACjB,
|
|
1
|
+
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/update/set.ts"],"names":[],"mappings":"AAwBA,MAAM,OAAO,SAAS;IACH,MAAM,CAAkB;IAEzC,YAAoB,MAAuB;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,OAAgC;QACvC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,CAAC,MAGT;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACjC,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CACxF;YACE,KAAK;YACL,MAAM;SACP,CACF,EAAE,CAAC;QACJ,IAAI,UAAU,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;YAC9D,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CACxE;gBACE,KAAK;gBACL,MAAM;aACP,CACF,EAAE,CAAC;QACN,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAuB;QACjC,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AAUD,MAAM,UAAU,GAAG,CACjB,IAAU,EACV,OAAmB,EACnB,QAAsB,EACtB,aAA0B;IAE1B,OAAO,SAAS,CAAC,IAAI,CAAC;QACpB,IAAI;QACJ,OAAO;QACP,QAAQ;QACR,aAAa;KACd,CAAC,CAAC;AACL,CAAC"}
|