@infra-blocks/aws-dynamodb 0.64.0-alpha.0 → 0.64.0-alpha.1
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/projection.d.ts +10 -0
- package/lib/cjs/commands/expressions/projection.js +15 -0
- package/lib/cjs/commands/expressions/projection.js.map +1 -1
- package/lib/esm/commands/expressions/projection.d.ts +10 -0
- package/lib/esm/commands/expressions/projection.js +12 -0
- package/lib/esm/commands/expressions/projection.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,5 +7,15 @@ export type ProjectionExpression = {
|
|
|
7
7
|
}): string;
|
|
8
8
|
};
|
|
9
9
|
export declare const ProjectionExpression: {
|
|
10
|
+
/**
|
|
11
|
+
* Constructs a {@link ProjectionExpression} from the provided {@link ProjectionExpressionParams}.
|
|
12
|
+
*
|
|
13
|
+
* Note that an empty expression is an invalid value for the DynamoDB API. To catch this
|
|
14
|
+
* mistake earlier, this function will throw if the provided list of paths is empty.
|
|
15
|
+
*
|
|
16
|
+
* @param expressionParams - The list of paths to include in the projection expression.
|
|
17
|
+
*
|
|
18
|
+
* @returns The {@link ProjectionExpression} corresponding to the provided {@link ProjectionExpressionParams}.
|
|
19
|
+
*/
|
|
10
20
|
from(expressionParams: ProjectionExpressionParams): ProjectionExpression;
|
|
11
21
|
};
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ProjectionExpression = void 0;
|
|
7
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
4
8
|
const index_js_1 = require("./operands/index.js");
|
|
5
9
|
exports.ProjectionExpression = {
|
|
10
|
+
/**
|
|
11
|
+
* Constructs a {@link ProjectionExpression} from the provided {@link ProjectionExpressionParams}.
|
|
12
|
+
*
|
|
13
|
+
* Note that an empty expression is an invalid value for the DynamoDB API. To catch this
|
|
14
|
+
* mistake earlier, this function will throw if the provided list of paths is empty.
|
|
15
|
+
*
|
|
16
|
+
* @param expressionParams - The list of paths to include in the projection expression.
|
|
17
|
+
*
|
|
18
|
+
* @returns The {@link ProjectionExpression} corresponding to the provided {@link ProjectionExpressionParams}.
|
|
19
|
+
*/
|
|
6
20
|
from(expressionParams) {
|
|
21
|
+
(0, node_assert_1.default)(expressionParams.length > 0, "expression params cannot be empty");
|
|
7
22
|
return {
|
|
8
23
|
stringify(stringifyParams) {
|
|
9
24
|
const { names } = stringifyParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.js","sourceRoot":"","sources":["../../../../src/commands/expressions/projection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"projection.js","sourceRoot":"","sources":["../../../../src/commands/expressions/projection.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AAEjC,kDAAyD;AAQ5C,QAAA,oBAAoB,GAAG;IAClC;;;;;;;;;OASG;IACH,IAAI,CAAC,gBAA4C;QAC/C,IAAA,qBAAM,EAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,mCAAmC,CAAC,CAAC;QAEzE,OAAO;YACL,SAAS,CAAC,eAAe;gBACvB,MAAM,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC;gBAClC,MAAM,aAAa,GAAG,EAAE,CAAC;gBACzB,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAC;oBACpC,aAAa,CAAC,IAAI,CAAC,eAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;gBACjE,CAAC;gBACD,OAAO,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACjC,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -7,5 +7,15 @@ export type ProjectionExpression = {
|
|
|
7
7
|
}): string;
|
|
8
8
|
};
|
|
9
9
|
export declare const ProjectionExpression: {
|
|
10
|
+
/**
|
|
11
|
+
* Constructs a {@link ProjectionExpression} from the provided {@link ProjectionExpressionParams}.
|
|
12
|
+
*
|
|
13
|
+
* Note that an empty expression is an invalid value for the DynamoDB API. To catch this
|
|
14
|
+
* mistake earlier, this function will throw if the provided list of paths is empty.
|
|
15
|
+
*
|
|
16
|
+
* @param expressionParams - The list of paths to include in the projection expression.
|
|
17
|
+
*
|
|
18
|
+
* @returns The {@link ProjectionExpression} corresponding to the provided {@link ProjectionExpressionParams}.
|
|
19
|
+
*/
|
|
10
20
|
from(expressionParams: ProjectionExpressionParams): ProjectionExpression;
|
|
11
21
|
};
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
import assert from "node:assert";
|
|
1
2
|
import { Path } from "./operands/index.js";
|
|
2
3
|
export const ProjectionExpression = {
|
|
4
|
+
/**
|
|
5
|
+
* Constructs a {@link ProjectionExpression} from the provided {@link ProjectionExpressionParams}.
|
|
6
|
+
*
|
|
7
|
+
* Note that an empty expression is an invalid value for the DynamoDB API. To catch this
|
|
8
|
+
* mistake earlier, this function will throw if the provided list of paths is empty.
|
|
9
|
+
*
|
|
10
|
+
* @param expressionParams - The list of paths to include in the projection expression.
|
|
11
|
+
*
|
|
12
|
+
* @returns The {@link ProjectionExpression} corresponding to the provided {@link ProjectionExpressionParams}.
|
|
13
|
+
*/
|
|
3
14
|
from(expressionParams) {
|
|
15
|
+
assert(expressionParams.length > 0, "expression params cannot be empty");
|
|
4
16
|
return {
|
|
5
17
|
stringify(stringifyParams) {
|
|
6
18
|
const { names } = stringifyParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.js","sourceRoot":"","sources":["../../../../src/commands/expressions/projection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"projection.js","sourceRoot":"","sources":["../../../../src/commands/expressions/projection.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAgB,MAAM,qBAAqB,CAAC;AAQzD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC;;;;;;;;;OASG;IACH,IAAI,CAAC,gBAA4C;QAC/C,MAAM,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,mCAAmC,CAAC,CAAC;QAEzE,OAAO;YACL,SAAS,CAAC,eAAe;gBACvB,MAAM,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC;gBAClC,MAAM,aAAa,GAAG,EAAE,CAAC;gBACzB,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAC;oBACpC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;gBACjE,CAAC;gBACD,OAAO,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACjC,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
|