dynamo-document-builder 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/entity.cjs +20 -6
- package/dist/core/entity.cjs.map +1 -1
- package/dist/core/entity.d.ts +4 -4
- package/dist/core/entity.mjs +20 -6
- package/dist/core/entity.mjs.map +1 -1
- package/dist/core/index.cjs +1 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/core/key.cjs +48 -0
- package/dist/core/key.cjs.map +1 -1
- package/dist/core/key.d.ts +41 -5
- package/dist/core/key.mjs +48 -1
- package/dist/core/key.mjs.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/core/entity.cjs
CHANGED
|
@@ -65,11 +65,21 @@ class DynamoEntity {
|
|
|
65
65
|
if (!gsiKeyBuilder || !gsiKeyNames) {
|
|
66
66
|
return item;
|
|
67
67
|
}
|
|
68
|
-
const key = {
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
const key = {};
|
|
69
|
+
if (gsiKeyNames.partitionKey) {
|
|
70
|
+
const gsiPK = gsiKeyBuilder.partitionKey(item);
|
|
71
|
+
if (gsiPK !== undefined) {
|
|
72
|
+
key[gsiKeyNames.partitionKey] = gsiPK;
|
|
73
|
+
}
|
|
74
|
+
else if (gsiPK === undefined) {
|
|
75
|
+
return {};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
71
78
|
if (gsiKeyBuilder.sortKey && gsiKeyNames.sortKey) {
|
|
72
|
-
|
|
79
|
+
const gsiSK = gsiKeyBuilder.sortKey(item);
|
|
80
|
+
if (gsiSK !== undefined) {
|
|
81
|
+
key[gsiKeyNames.sortKey] = gsiSK;
|
|
82
|
+
}
|
|
73
83
|
}
|
|
74
84
|
return key;
|
|
75
85
|
}
|
|
@@ -79,10 +89,14 @@ class DynamoEntity {
|
|
|
79
89
|
if (!tslib_es6.__classPrivateFieldGet(this, _DynamoEntity_pk, "f") || !lsiKeyBuilder || !lsiKeyNames) {
|
|
80
90
|
return item;
|
|
81
91
|
}
|
|
82
|
-
|
|
92
|
+
const key = {
|
|
83
93
|
[this.table.partitionKeyName]: this.buildPartitionKey(item),
|
|
84
|
-
[lsiKeyNames.sortKey]: lsiKeyBuilder.sortKey(item),
|
|
85
94
|
};
|
|
95
|
+
const lsiSK = lsiKeyBuilder.sortKey(item);
|
|
96
|
+
if (lsiSK !== undefined) {
|
|
97
|
+
key[lsiKeyNames.sortKey] = lsiSK;
|
|
98
|
+
}
|
|
99
|
+
return key;
|
|
86
100
|
}
|
|
87
101
|
buildPrimaryOrIndexKey(keyInput) {
|
|
88
102
|
if ('key' in keyInput) {
|
package/dist/core/entity.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.cjs","sources":["../../src/core/entity.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","__classPrivateFieldGet","DocumentBuilderError","__asyncValues","__await"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"entity.cjs","sources":["../../src/core/entity.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","__classPrivateFieldGet","DocumentBuilderError","__asyncValues","__await"],"mappings":";;;;;;MAiCa,YAAY,CAAA;AAUvB,IAAA,WAAA,CAAY,MAAkC,EAAA;;QAT9C,mBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QACA,oBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAEA,gBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QACA,gBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QAEA,iBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;QACA,iBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,M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AAM,CAAC,OAAO,EAAE,IAAI,CAAC,4BAA4B,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC5E;AACA,QAAA,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,IAAI,CAACA,gCAAA,CAAA,IAAI,EAAA,iBAAA,EAAA,GAAA,CAAK,CAAC,EAAE;AAC9C,YAAA,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,2BAA2B,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC3E;AACA,QAAA,OAAO,OAAO;IAChB;AAEa,IAAA,IAAI,CACf,OAA2C,EAAA;;AAE3C,YAAA,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;QACpC,CAAC,CAAA;AAAA,IAAA;AAEa,IAAA,QAAQ,CACpB,WAAmD,EAAA;;;;AAEnD,gBAAA,KAAyB,IAAA,EAAA,GAAA,IAAA,EAAA,EAAA,GAAAE,uBAAA,CAAA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA,EAAA,GAAA,MAAAC,iBAAA,CAAA,EAAA,CAAA,IAAA,EAAA,CAAA,EAAA,EAAA,GAAA,EAAA,CAAA,IAAA,EAAA,CAAA,EAAA,EAAA,EAAA,GAAA,IAAA,EAAE;oBAApC,EAAA,GAAA,EAAA,CAAA,KAAA;oBAAA,EAAA,GAAA,KAAA;oBAAd,MAAM,IAAI,KAAA;oBACnB,MAAA,MAAAA,iBAAA,CAAM,IAAI,CAAA;gBACZ;;;;;;;;;QACF,CAAC,CAAA;AAAA,IAAA;AACF;;;;;"}
|
package/dist/core/entity.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCommand, BasePaginatable } from '../commands/base-command.js';
|
|
2
|
-
import { DynamoKeyBuilder, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders, DynamoKeyableValue, DynamoKey } from './key.js';
|
|
2
|
+
import { DynamoKeyBuilder, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders, DynamoKeyableValue, DynamoKey, DynamoIndexKey } from './key.js';
|
|
3
3
|
import { DynamoTable } from './table.js';
|
|
4
4
|
import { ZodObject } from 'zod/v4';
|
|
5
5
|
import { EntitySchema } from './core-types.js';
|
|
@@ -31,9 +31,9 @@ declare class DynamoEntity<Schema extends ZodObject> {
|
|
|
31
31
|
buildPartitionKey(item: Partial<EntitySchema<Schema>>): DynamoKeyableValue | undefined;
|
|
32
32
|
buildSortKey(item: Partial<EntitySchema<Schema>>): DynamoKeyableValue | undefined;
|
|
33
33
|
buildPrimaryKey(item: Partial<EntitySchema<Schema>>): DynamoKey;
|
|
34
|
-
buildGlobalSecondaryIndexKey(indexName: string, item: Partial<EntitySchema<Schema>>):
|
|
35
|
-
buildLocalSecondaryIndexKey(indexName: string, item: Partial<EntitySchema<Schema>>):
|
|
36
|
-
buildPrimaryOrIndexKey(keyInput: EntityKeyInput<EntitySchema<Schema>>): DynamoKey;
|
|
34
|
+
buildGlobalSecondaryIndexKey(indexName: string, item: Partial<EntitySchema<Schema>>): DynamoIndexKey;
|
|
35
|
+
buildLocalSecondaryIndexKey(indexName: string, item: Partial<EntitySchema<Schema>>): DynamoIndexKey;
|
|
36
|
+
buildPrimaryOrIndexKey(keyInput: EntityKeyInput<EntitySchema<Schema>>): DynamoKey | DynamoIndexKey;
|
|
37
37
|
buildAllKeys(item: Partial<EntitySchema<Schema>>): DynamoKey;
|
|
38
38
|
send<CommandOutput>(command: BaseCommand<CommandOutput, Schema>): Promise<CommandOutput>;
|
|
39
39
|
paginate<CommandOutput>(paginatable: BasePaginatable<CommandOutput, Schema>): AsyncGenerator<CommandOutput, void, unknown>;
|
package/dist/core/entity.mjs
CHANGED
|
@@ -63,11 +63,21 @@ class DynamoEntity {
|
|
|
63
63
|
if (!gsiKeyBuilder || !gsiKeyNames) {
|
|
64
64
|
return item;
|
|
65
65
|
}
|
|
66
|
-
const key = {
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
const key = {};
|
|
67
|
+
if (gsiKeyNames.partitionKey) {
|
|
68
|
+
const gsiPK = gsiKeyBuilder.partitionKey(item);
|
|
69
|
+
if (gsiPK !== undefined) {
|
|
70
|
+
key[gsiKeyNames.partitionKey] = gsiPK;
|
|
71
|
+
}
|
|
72
|
+
else if (gsiPK === undefined) {
|
|
73
|
+
return {};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
69
76
|
if (gsiKeyBuilder.sortKey && gsiKeyNames.sortKey) {
|
|
70
|
-
|
|
77
|
+
const gsiSK = gsiKeyBuilder.sortKey(item);
|
|
78
|
+
if (gsiSK !== undefined) {
|
|
79
|
+
key[gsiKeyNames.sortKey] = gsiSK;
|
|
80
|
+
}
|
|
71
81
|
}
|
|
72
82
|
return key;
|
|
73
83
|
}
|
|
@@ -77,10 +87,14 @@ class DynamoEntity {
|
|
|
77
87
|
if (!__classPrivateFieldGet(this, _DynamoEntity_pk, "f") || !lsiKeyBuilder || !lsiKeyNames) {
|
|
78
88
|
return item;
|
|
79
89
|
}
|
|
80
|
-
|
|
90
|
+
const key = {
|
|
81
91
|
[this.table.partitionKeyName]: this.buildPartitionKey(item),
|
|
82
|
-
[lsiKeyNames.sortKey]: lsiKeyBuilder.sortKey(item),
|
|
83
92
|
};
|
|
93
|
+
const lsiSK = lsiKeyBuilder.sortKey(item);
|
|
94
|
+
if (lsiSK !== undefined) {
|
|
95
|
+
key[lsiKeyNames.sortKey] = lsiSK;
|
|
96
|
+
}
|
|
97
|
+
return key;
|
|
84
98
|
}
|
|
85
99
|
buildPrimaryOrIndexKey(keyInput) {
|
|
86
100
|
if ('key' in keyInput) {
|
package/dist/core/entity.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.mjs","sources":["../../src/core/entity.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"entity.mjs","sources":["../../src/core/entity.ts"],"sourcesContent":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A,KAAA;oBAAd,MAAM,IAAI,KAAA;oBACnB,MAAA,MAAA,OAAA,CAAM,IAAI,CAAA;gBACZ;;;;;;;;;QACF,CAAC,CAAA;AAAA,IAAA;AACF;;;;;"}
|
package/dist/core/index.cjs
CHANGED
package/dist/core/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { EncodedEntity, EncodedEntitySchema, Entity, EntitySchema, GlobalSecondaryIndexKeyName, IndexName, LocalSecondaryIndexKeyName, NamedGlobalSecondaryIndexKeyNames, NamedLocalSecondaryIndexKeyNames, TransactWriteOperation } from './core-types.js';
|
|
2
2
|
export { DynamoEntity, DynamoEntityConfig, EntityKeyInput } from './entity.js';
|
|
3
|
-
export { DynamoKey, DynamoKeyBuilder, DynamoKeyableValue, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders, key } from './key.js';
|
|
3
|
+
export { DynamoIndexKey, DynamoIndexKeyBuilder, DynamoIndexKeyableValue, DynamoKey, DynamoKeyBuilder, DynamoKeyableValue, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders, indexKey, key } from './key.js';
|
|
4
4
|
export { DynamoTable, DynamoTableConfig } from './table.js';
|
package/dist/core/index.mjs
CHANGED
package/dist/core/key.cjs
CHANGED
|
@@ -1,8 +1,56 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var errors = require('../errors.cjs');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Builds a DynamoDB key from the given parts by concatenating them with a '#' separator.
|
|
7
|
+
* At least one part must be provided, or a DocumentBuilderError will be thrown.
|
|
8
|
+
*
|
|
9
|
+
* @param parts - The parts to combine into a key.
|
|
10
|
+
* @returns The combined key as a string.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const key1 = key('USER', 123) // 'USER#123'
|
|
15
|
+
* const key2 = key('METADATA') // 'METADATA'
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
3
18
|
function key(...parts) {
|
|
19
|
+
if (!parts.length) {
|
|
20
|
+
throw new errors.DocumentBuilderError('At least one key part must be provided');
|
|
21
|
+
}
|
|
4
22
|
return parts.join('#');
|
|
5
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Builds a DynamoDB key from the given parts. This function is specifically for secondary index keys,
|
|
26
|
+
* where any part can be undefined. If any part is undefined, the function returns undefined.
|
|
27
|
+
*
|
|
28
|
+
* For primary keys, use the `key` function instead.
|
|
29
|
+
*
|
|
30
|
+
* This is specifically useful for building keys for queries on secondary indexes, or for sparse indexes.
|
|
31
|
+
*
|
|
32
|
+
* @param parts - The parts to combine into a key.
|
|
33
|
+
* @returns The combined key as a string, or undefined if any part is undefined.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const key1 = indexKey('part1', 'part2', 'part3') // 'part1#part2#part3'
|
|
38
|
+
* const key2 = indexKey('part1', undefined, 'part3') // undefined
|
|
39
|
+
* const key3 = indexKey(undefined, 'part2', 'part3') // undefined
|
|
40
|
+
* const key4 = indexKey('part1', 'part2', undefined) // undefined
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
function indexKey(...parts) {
|
|
44
|
+
let key = '';
|
|
45
|
+
for (const part of parts) {
|
|
46
|
+
if (part === undefined) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
key += key ? `#${part}` : part;
|
|
50
|
+
}
|
|
51
|
+
return key;
|
|
52
|
+
}
|
|
6
53
|
|
|
54
|
+
exports.indexKey = indexKey;
|
|
7
55
|
exports.key = key;
|
|
8
56
|
//# sourceMappingURL=key.cjs.map
|
package/dist/core/key.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key.cjs","sources":["../../src/core/key.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"key.cjs","sources":["../../src/core/key.ts"],"sourcesContent":[null],"names":["DocumentBuilderError"],"mappings":";;;;AA2BA;;;;;;;;;;;;AAYG;AACG,SAAU,GAAG,CAAC,GAAG,KAA2B,EAAA;AAChD,IAAA,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;AACjB,QAAA,MAAM,IAAIA,2BAAoB,CAAC,wCAAwC,CAAC;IAC1E;AACA,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;AACxB;AAEA;;;;;;;;;;;;;;;;;;AAkBG;AACG,SAAU,QAAQ,CAAC,GAAG,KAAgC,EAAA;IAC1D,IAAI,GAAG,GAAW,EAAE;AACpB,IAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AACxB,QAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,YAAA,OAAO,SAAS;QAClB;AACA,QAAA,GAAG,IAAI,GAAG,GAAG,CAAA,CAAA,EAAI,IAAI,CAAA,CAAE,GAAG,IAAI;IAChC;AACA,IAAA,OAAO,GAAG;AACZ;;;;;"}
|
package/dist/core/key.d.ts
CHANGED
|
@@ -1,16 +1,52 @@
|
|
|
1
1
|
import { IndexName } from './core-types.js';
|
|
2
2
|
|
|
3
3
|
type DynamoKeyableValue = string | number | Buffer;
|
|
4
|
+
type DynamoIndexKeyableValue = string | number | Buffer | undefined;
|
|
4
5
|
type DynamoKeyBuilder<Item> = (item: Item) => DynamoKeyableValue;
|
|
6
|
+
type DynamoIndexKeyBuilder<Item> = (item: Item) => DynamoIndexKeyableValue;
|
|
5
7
|
type GlobalSecondaryIndexKeyBuilders<Item> = Record<IndexName, {
|
|
6
|
-
partitionKey:
|
|
7
|
-
sortKey?:
|
|
8
|
+
partitionKey: DynamoIndexKeyBuilder<Item>;
|
|
9
|
+
sortKey?: DynamoIndexKeyBuilder<Item>;
|
|
8
10
|
}>;
|
|
9
11
|
type LocalSecondaryIndexKeyBuilders<Item> = Record<IndexName, {
|
|
10
|
-
sortKey:
|
|
12
|
+
sortKey: DynamoIndexKeyBuilder<Item>;
|
|
11
13
|
}>;
|
|
12
14
|
type DynamoKey = Record<string, DynamoKeyableValue>;
|
|
15
|
+
type DynamoIndexKey = Record<string, DynamoIndexKeyableValue>;
|
|
16
|
+
/**
|
|
17
|
+
* Builds a DynamoDB key from the given parts by concatenating them with a '#' separator.
|
|
18
|
+
* At least one part must be provided, or a DocumentBuilderError will be thrown.
|
|
19
|
+
*
|
|
20
|
+
* @param parts - The parts to combine into a key.
|
|
21
|
+
* @returns The combined key as a string.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const key1 = key('USER', 123) // 'USER#123'
|
|
26
|
+
* const key2 = key('METADATA') // 'METADATA'
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
13
29
|
declare function key(...parts: DynamoKeyableValue[]): string;
|
|
30
|
+
/**
|
|
31
|
+
* Builds a DynamoDB key from the given parts. This function is specifically for secondary index keys,
|
|
32
|
+
* where any part can be undefined. If any part is undefined, the function returns undefined.
|
|
33
|
+
*
|
|
34
|
+
* For primary keys, use the `key` function instead.
|
|
35
|
+
*
|
|
36
|
+
* This is specifically useful for building keys for queries on secondary indexes, or for sparse indexes.
|
|
37
|
+
*
|
|
38
|
+
* @param parts - The parts to combine into a key.
|
|
39
|
+
* @returns The combined key as a string, or undefined if any part is undefined.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const key1 = indexKey('part1', 'part2', 'part3') // 'part1#part2#part3'
|
|
44
|
+
* const key2 = indexKey('part1', undefined, 'part3') // undefined
|
|
45
|
+
* const key3 = indexKey(undefined, 'part2', 'part3') // undefined
|
|
46
|
+
* const key4 = indexKey('part1', 'part2', undefined) // undefined
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
declare function indexKey(...parts: DynamoIndexKeyableValue[]): string | undefined;
|
|
14
50
|
|
|
15
|
-
export { key };
|
|
16
|
-
export type { DynamoKey, DynamoKeyBuilder, DynamoKeyableValue, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders };
|
|
51
|
+
export { indexKey, key };
|
|
52
|
+
export type { DynamoIndexKey, DynamoIndexKeyBuilder, DynamoIndexKeyableValue, DynamoKey, DynamoKeyBuilder, DynamoKeyableValue, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders };
|
package/dist/core/key.mjs
CHANGED
|
@@ -1,6 +1,53 @@
|
|
|
1
|
+
import { DocumentBuilderError } from '../errors.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Builds a DynamoDB key from the given parts by concatenating them with a '#' separator.
|
|
5
|
+
* At least one part must be provided, or a DocumentBuilderError will be thrown.
|
|
6
|
+
*
|
|
7
|
+
* @param parts - The parts to combine into a key.
|
|
8
|
+
* @returns The combined key as a string.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const key1 = key('USER', 123) // 'USER#123'
|
|
13
|
+
* const key2 = key('METADATA') // 'METADATA'
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
1
16
|
function key(...parts) {
|
|
17
|
+
if (!parts.length) {
|
|
18
|
+
throw new DocumentBuilderError('At least one key part must be provided');
|
|
19
|
+
}
|
|
2
20
|
return parts.join('#');
|
|
3
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Builds a DynamoDB key from the given parts. This function is specifically for secondary index keys,
|
|
24
|
+
* where any part can be undefined. If any part is undefined, the function returns undefined.
|
|
25
|
+
*
|
|
26
|
+
* For primary keys, use the `key` function instead.
|
|
27
|
+
*
|
|
28
|
+
* This is specifically useful for building keys for queries on secondary indexes, or for sparse indexes.
|
|
29
|
+
*
|
|
30
|
+
* @param parts - The parts to combine into a key.
|
|
31
|
+
* @returns The combined key as a string, or undefined if any part is undefined.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const key1 = indexKey('part1', 'part2', 'part3') // 'part1#part2#part3'
|
|
36
|
+
* const key2 = indexKey('part1', undefined, 'part3') // undefined
|
|
37
|
+
* const key3 = indexKey(undefined, 'part2', 'part3') // undefined
|
|
38
|
+
* const key4 = indexKey('part1', 'part2', undefined) // undefined
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
function indexKey(...parts) {
|
|
42
|
+
let key = '';
|
|
43
|
+
for (const part of parts) {
|
|
44
|
+
if (part === undefined) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
key += key ? `#${part}` : part;
|
|
48
|
+
}
|
|
49
|
+
return key;
|
|
50
|
+
}
|
|
4
51
|
|
|
5
|
-
export { key };
|
|
52
|
+
export { indexKey, key };
|
|
6
53
|
//# sourceMappingURL=key.mjs.map
|
package/dist/core/key.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key.mjs","sources":["../../src/core/key.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"key.mjs","sources":["../../src/core/key.ts"],"sourcesContent":[null],"names":[],"mappings":";;AA2BA;;;;;;;;;;;;AAYG;AACG,SAAU,GAAG,CAAC,GAAG,KAA2B,EAAA;AAChD,IAAA,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;AACjB,QAAA,MAAM,IAAI,oBAAoB,CAAC,wCAAwC,CAAC;IAC1E;AACA,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;AACxB;AAEA;;;;;;;;;;;;;;;;;;AAkBG;AACG,SAAU,QAAQ,CAAC,GAAG,KAAgC,EAAA;IAC1D,IAAI,GAAG,GAAW,EAAE;AACpB,IAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AACxB,QAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,YAAA,OAAO,SAAS;QAClB;AACA,QAAA,GAAG,IAAI,GAAG,GAAG,CAAA,CAAA,EAAI,IAAI,CAAA,CAAE,GAAG,IAAI;IAChC;AACA,IAAA,OAAO,GAAG;AACZ;;;;"}
|
package/dist/index.cjs
CHANGED
|
@@ -92,6 +92,7 @@ exports.or = conditions_or.or;
|
|
|
92
92
|
exports.size = conditions_size.size;
|
|
93
93
|
exports.typeIs = conditions_typeIs.typeIs;
|
|
94
94
|
exports.DynamoEntity = core_entity.DynamoEntity;
|
|
95
|
+
exports.indexKey = core_key.indexKey;
|
|
95
96
|
exports.key = core_key.key;
|
|
96
97
|
exports.DynamoTable = core_table.DynamoTable;
|
|
97
98
|
exports.DocumentBuilderError = errors.DocumentBuilderError;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export { size } from './conditions/size.js';
|
|
|
39
39
|
export { typeIs } from './conditions/type-is.js';
|
|
40
40
|
export { EncodedEntity, EncodedEntitySchema, Entity, EntitySchema, GlobalSecondaryIndexKeyName, IndexName, LocalSecondaryIndexKeyName, NamedGlobalSecondaryIndexKeyNames, NamedLocalSecondaryIndexKeyNames, TransactWriteOperation } from './core/core-types.js';
|
|
41
41
|
export { DynamoEntity, DynamoEntityConfig, EntityKeyInput } from './core/entity.js';
|
|
42
|
-
export { DynamoKey, DynamoKeyBuilder, DynamoKeyableValue, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders, key } from './core/key.js';
|
|
42
|
+
export { DynamoIndexKey, DynamoIndexKeyBuilder, DynamoIndexKeyableValue, DynamoKey, DynamoKeyBuilder, DynamoKeyableValue, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders, indexKey, key } from './core/key.js';
|
|
43
43
|
export { DynamoTable, DynamoTableConfig } from './core/table.js';
|
|
44
44
|
export { DocumentBuilderError } from './errors.js';
|
|
45
45
|
export { Projection } from './projections/projection-types.js';
|
package/dist/index.mjs
CHANGED
|
@@ -36,7 +36,7 @@ export { or } from './conditions/or.mjs';
|
|
|
36
36
|
export { size } from './conditions/size.mjs';
|
|
37
37
|
export { typeIs } from './conditions/type-is.mjs';
|
|
38
38
|
export { DynamoEntity } from './core/entity.mjs';
|
|
39
|
-
export { key } from './core/key.mjs';
|
|
39
|
+
export { indexKey, key } from './core/key.mjs';
|
|
40
40
|
export { DynamoTable } from './core/table.mjs';
|
|
41
41
|
export { DocumentBuilderError } from './errors.mjs';
|
|
42
42
|
export { parseProjection } from './projections/projection-parser.mjs';
|
package/package.json
CHANGED