@squiz/db-lib 1.71.3 → 1.72.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/lib/dynamodb/AbstractDynamoDbRepository.d.ts +49 -9
- package/lib/dynamodb/AbstractDynamoDbRepository.d.ts.map +1 -1
- package/lib/dynamodb/AbstractDynamoDbRepository.js +108 -19
- package/lib/dynamodb/AbstractDynamoDbRepository.js.map +1 -1
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.d.ts.map +1 -1
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.js +257 -31
- package/lib/dynamodb/AbstractDynamoDbRepository.spec.js.map +1 -1
- package/package.json +2 -2
- package/src/dynamodb/AbstractDynamoDbRepository.spec.ts +289 -37
- package/src/dynamodb/AbstractDynamoDbRepository.ts +140 -31
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,23 @@
|
|
1
1
|
import { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
|
2
2
|
import { Transaction, DynamoDbManager } from '..';
|
3
|
+
export type QueryFilterTypeBeginsWith = {
|
4
|
+
type: 'begins_with';
|
5
|
+
keyword: string;
|
6
|
+
};
|
7
|
+
export type QueryOptions = {
|
8
|
+
useSortKey?: boolean;
|
9
|
+
index?: keyof TableIndexes;
|
10
|
+
limit?: number;
|
11
|
+
order?: 'desc' | 'asc';
|
12
|
+
filter?: QueryFilterTypeBeginsWith;
|
13
|
+
};
|
3
14
|
interface Reader<T> {
|
4
|
-
queryItems(partialItem: Partial<T>,
|
15
|
+
queryItems(partialItem: Partial<T>, options?: QueryOptions): Promise<T[]>;
|
5
16
|
getItem(id: string | Partial<T>): Promise<T | undefined>;
|
6
17
|
}
|
7
18
|
interface Writer<T> {
|
8
19
|
createItem(item: Partial<T>): Promise<T>;
|
9
|
-
updateItem(partialItem: Partial<T
|
20
|
+
updateItem(partialItem: Partial<T>): Promise<T | undefined>;
|
10
21
|
deleteItem(partialItem: Partial<T>): Promise<number>;
|
11
22
|
}
|
12
23
|
type Repository<T> = Reader<T> & Writer<T>;
|
@@ -54,38 +65,61 @@ export declare abstract class AbstractDynamoDbRepository<SHAPE extends object, D
|
|
54
65
|
* @throws MissingKeyValuesError
|
55
66
|
*/
|
56
67
|
getItem(item: Partial<SHAPE>): Promise<DATA_CLASS | undefined>;
|
68
|
+
/**
|
69
|
+
* Get the single item each matching the key fields value in the given
|
70
|
+
* partial items. Will throw MissingKeyValuesError if key field values
|
71
|
+
* are missing
|
72
|
+
* Uses batchGet() to request 100 items in a batch
|
73
|
+
*
|
74
|
+
* @param item
|
75
|
+
*
|
76
|
+
* @throws MissingKeyValuesError
|
77
|
+
*/
|
78
|
+
getItems(items: Partial<SHAPE>[]): Promise<DATA_CLASS[]>;
|
79
|
+
/**
|
80
|
+
* Returns the batch items from the items primary key
|
81
|
+
*
|
82
|
+
* @param items
|
83
|
+
* @returns
|
84
|
+
*/
|
85
|
+
private getBatchItems;
|
57
86
|
/**
|
58
87
|
* Finds all the items matching the partition key or
|
59
88
|
* the gsi key (when gsi index name is specified)
|
60
89
|
*
|
61
90
|
* @param item
|
62
|
-
* @param
|
63
|
-
* @param index
|
91
|
+
* @param options
|
64
92
|
* @throws MissingKeyValuesError
|
65
93
|
*/
|
66
|
-
queryItems(item: Partial<SHAPE>,
|
94
|
+
queryItems(item: Partial<SHAPE>, options?: QueryOptions): Promise<DATA_CLASS[]>;
|
95
|
+
/**
|
96
|
+
* Evaluate filter condition for sort key
|
97
|
+
* @param filter
|
98
|
+
* @returns string
|
99
|
+
*/
|
100
|
+
private getFilterKeyConditionExpression;
|
67
101
|
/**
|
68
102
|
* Update the existing item matching the key fields value
|
69
|
-
* in the passed
|
70
|
-
* @param partialItem
|
103
|
+
* in the passed newValue
|
71
104
|
* @param newValue
|
72
105
|
* @param transaction
|
73
106
|
*
|
74
107
|
* @returns Promise<SHAPE | undefined>
|
75
108
|
* @throws MissingKeyValuesError
|
76
109
|
*/
|
77
|
-
updateItem(
|
110
|
+
updateItem(newValue: Partial<SHAPE>, transaction?: Transaction): Promise<DATA_CLASS | undefined>;
|
78
111
|
/**
|
79
112
|
* Adds new item to the table
|
80
113
|
*
|
81
114
|
* @param value
|
82
115
|
* @param transaction
|
116
|
+
* @param additionalValue Additional item properties that are not part of the DATA_CLASS
|
83
117
|
*
|
84
118
|
* @returns Promise<SHAPE>
|
85
119
|
* @throws DuplicateItemError
|
86
120
|
* @throws MissingKeyValuesError
|
87
121
|
*/
|
88
|
-
createItem(value: DATA_CLASS, transaction?: Transaction): Promise<DATA_CLASS>;
|
122
|
+
createItem(value: DATA_CLASS, transaction?: Transaction, additionalValue?: Partial<SHAPE>): Promise<DATA_CLASS>;
|
89
123
|
/**
|
90
124
|
* Deletes an item from the table
|
91
125
|
*
|
@@ -151,6 +185,12 @@ export declare abstract class AbstractDynamoDbRepository<SHAPE extends object, D
|
|
151
185
|
* @throw MissingKeyValuesError
|
152
186
|
*/
|
153
187
|
protected getKey(item: Partial<SHAPE>, attributeName: keyof KeysFormat): string;
|
188
|
+
/**
|
189
|
+
* Whether the given property name is part of the entity's pk/sk string
|
190
|
+
* @param propertyName
|
191
|
+
* @returns boolean
|
192
|
+
*/
|
193
|
+
private isPropertyPartOfKeys;
|
154
194
|
/**
|
155
195
|
* Validate the data matches with "DATA_MODEL"
|
156
196
|
* @param value
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AbstractDynamoDbRepository.d.ts","sourceRoot":"","sources":["../../src/dynamodb/AbstractDynamoDbRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAKjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,eAAe,EAA+C,MAAM,IAAI,CAAC;AAG/F,
|
1
|
+
{"version":3,"file":"AbstractDynamoDbRepository.d.ts","sourceRoot":"","sources":["../../src/dynamodb/AbstractDynamoDbRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAKjB,MAAM,uBAAuB,CAAC;AAE/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;IACH,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM;IAI7C;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM;IAI7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,MAAM,UAAU,GAAG,MAAM;IAuC/E;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAM5B;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;CAWhC"}
|
@@ -46,16 +46,64 @@ class AbstractDynamoDbRepository {
|
|
46
46
|
}
|
47
47
|
return this.hydrateItem(output.Item);
|
48
48
|
}
|
49
|
+
/**
|
50
|
+
* Get the single item each matching the key fields value in the given
|
51
|
+
* partial items. Will throw MissingKeyValuesError if key field values
|
52
|
+
* are missing
|
53
|
+
* Uses batchGet() to request 100 items in a batch
|
54
|
+
*
|
55
|
+
* @param item
|
56
|
+
*
|
57
|
+
* @throws MissingKeyValuesError
|
58
|
+
*/
|
59
|
+
async getItems(items) {
|
60
|
+
// this is the maximum items allowed by BatchGetItem()
|
61
|
+
const batchSize = 100;
|
62
|
+
let result = [];
|
63
|
+
for (let i = 0; i < items.length; i += batchSize) {
|
64
|
+
const batchResult = await this.getBatchItems(items.slice(i, i + batchSize));
|
65
|
+
result = result.concat(batchResult);
|
66
|
+
}
|
67
|
+
return result;
|
68
|
+
}
|
69
|
+
/**
|
70
|
+
* Returns the batch items from the items primary key
|
71
|
+
*
|
72
|
+
* @param items
|
73
|
+
* @returns
|
74
|
+
*/
|
75
|
+
async getBatchItems(items) {
|
76
|
+
const keys = [];
|
77
|
+
for (const item of items) {
|
78
|
+
keys.push({
|
79
|
+
[this.keys.pk.attributeName]: this.getPk(item),
|
80
|
+
[this.keys.sk.attributeName]: this.getSk(item),
|
81
|
+
});
|
82
|
+
}
|
83
|
+
const output = await this.client.batchGet({
|
84
|
+
RequestItems: {
|
85
|
+
[this.tableName]: {
|
86
|
+
Keys: keys,
|
87
|
+
},
|
88
|
+
},
|
89
|
+
});
|
90
|
+
if (output.Responses && output.Responses[this.tableName].length) {
|
91
|
+
return output.Responses[this.tableName].map((i) => this.hydrateItem(i));
|
92
|
+
}
|
93
|
+
return [];
|
94
|
+
}
|
49
95
|
/**
|
50
96
|
* Finds all the items matching the partition key or
|
51
97
|
* the gsi key (when gsi index name is specified)
|
52
98
|
*
|
53
99
|
* @param item
|
54
|
-
* @param
|
55
|
-
* @param index
|
100
|
+
* @param options
|
56
101
|
* @throws MissingKeyValuesError
|
57
102
|
*/
|
58
|
-
async queryItems(item,
|
103
|
+
async queryItems(item, options) {
|
104
|
+
var _a, _b;
|
105
|
+
const useSortKey = (options === null || options === void 0 ? void 0 : options.useSortKey) || (options === null || options === void 0 ? void 0 : options.filter);
|
106
|
+
const index = options === null || options === void 0 ? void 0 : options.index;
|
59
107
|
let pkName = this.keys.pk.attributeName;
|
60
108
|
let skName = this.keys.sk.attributeName;
|
61
109
|
let indexName = null;
|
@@ -72,8 +120,8 @@ class AbstractDynamoDbRepository {
|
|
72
120
|
const expressionAttributeNames = { '#pkName': pkName };
|
73
121
|
const expressionAttributeValues = { ':pkValue': pk };
|
74
122
|
if (useSortKey) {
|
75
|
-
const sk = this.getKey(item, skName);
|
76
|
-
keyConditionExpression.push(
|
123
|
+
const sk = (_b = (_a = options === null || options === void 0 ? void 0 : options.filter) === null || _a === void 0 ? void 0 : _a.keyword) !== null && _b !== void 0 ? _b : this.getKey(item, skName);
|
124
|
+
keyConditionExpression.push(this.getFilterKeyConditionExpression(options === null || options === void 0 ? void 0 : options.filter));
|
77
125
|
expressionAttributeNames['#skName'] = skName;
|
78
126
|
expressionAttributeValues[':skValue'] = sk;
|
79
127
|
}
|
@@ -86,22 +134,41 @@ class AbstractDynamoDbRepository {
|
|
86
134
|
if (indexName) {
|
87
135
|
queryCommandInput['IndexName'] = String(indexName);
|
88
136
|
}
|
137
|
+
if ((options === null || options === void 0 ? void 0 : options.order) !== undefined) {
|
138
|
+
queryCommandInput.ScanIndexForward = options.order === 'asc';
|
139
|
+
}
|
140
|
+
if ((options === null || options === void 0 ? void 0 : options.limit) !== undefined) {
|
141
|
+
queryCommandInput.Limit = options.limit;
|
142
|
+
}
|
89
143
|
const output = await this.client.query(queryCommandInput);
|
90
144
|
return !output.Items ? [] : output.Items.map((item) => this.hydrateItem(item));
|
91
145
|
}
|
146
|
+
/**
|
147
|
+
* Evaluate filter condition for sort key
|
148
|
+
* @param filter
|
149
|
+
* @returns string
|
150
|
+
*/
|
151
|
+
getFilterKeyConditionExpression(filter) {
|
152
|
+
if (filter === undefined) {
|
153
|
+
return '#skName = :skValue';
|
154
|
+
}
|
155
|
+
else if (filter.type === 'begins_with') {
|
156
|
+
return 'begins_with(#skName, :skValue)';
|
157
|
+
}
|
158
|
+
throw new Error(`Invalid query filter type: ${filter === null || filter === void 0 ? void 0 : filter.type}`);
|
159
|
+
}
|
92
160
|
/**
|
93
161
|
* Update the existing item matching the key fields value
|
94
|
-
* in the passed
|
95
|
-
* @param partialItem
|
162
|
+
* in the passed newValue
|
96
163
|
* @param newValue
|
97
164
|
* @param transaction
|
98
165
|
*
|
99
166
|
* @returns Promise<SHAPE | undefined>
|
100
167
|
* @throws MissingKeyValuesError
|
101
168
|
*/
|
102
|
-
async updateItem(
|
169
|
+
async updateItem(newValue, transaction = {}) {
|
103
170
|
var _a, _b;
|
104
|
-
const oldValue = await this.getItem(
|
171
|
+
const oldValue = await this.getItem(newValue);
|
105
172
|
if (oldValue === undefined) {
|
106
173
|
return undefined;
|
107
174
|
}
|
@@ -112,17 +179,26 @@ class AbstractDynamoDbRepository {
|
|
112
179
|
const expressionAttributeNames = {};
|
113
180
|
const expressionAttributeValues = {};
|
114
181
|
for (const modelProperty of Object.keys(newValue)) {
|
182
|
+
const propValue = (_a = newValue[modelProperty]) !== null && _a !== void 0 ? _a : null;
|
183
|
+
if (propValue === oldValue[modelProperty]) {
|
184
|
+
// don't need to update the properties that are unchanged
|
185
|
+
continue;
|
186
|
+
}
|
115
187
|
const propName = `#${modelProperty}`;
|
116
|
-
const
|
117
|
-
updateExpression.push(`${propName} = ${
|
188
|
+
const propValuePlaceHolder = `:${modelProperty}`;
|
189
|
+
updateExpression.push(`${propName} = ${propValuePlaceHolder}`);
|
118
190
|
expressionAttributeNames[propName] = modelProperty;
|
119
|
-
expressionAttributeValues[
|
191
|
+
expressionAttributeValues[propValuePlaceHolder] = propValue;
|
192
|
+
}
|
193
|
+
if (!updateExpression.length) {
|
194
|
+
// nothing to update
|
195
|
+
return value;
|
120
196
|
}
|
121
197
|
const updateCommandInput = {
|
122
198
|
TableName: this.tableName,
|
123
199
|
Key: {
|
124
|
-
[this.keys.pk.attributeName]: this.getPk(
|
125
|
-
[this.keys.sk.attributeName]: this.getSk(
|
200
|
+
[this.keys.pk.attributeName]: this.getPk(newValue),
|
201
|
+
[this.keys.sk.attributeName]: this.getSk(newValue),
|
126
202
|
},
|
127
203
|
UpdateExpression: 'SET ' + updateExpression.join(','),
|
128
204
|
ExpressionAttributeValues: expressionAttributeValues,
|
@@ -161,12 +237,13 @@ class AbstractDynamoDbRepository {
|
|
161
237
|
*
|
162
238
|
* @param value
|
163
239
|
* @param transaction
|
240
|
+
* @param additionalValue Additional item properties that are not part of the DATA_CLASS
|
164
241
|
*
|
165
242
|
* @returns Promise<SHAPE>
|
166
243
|
* @throws DuplicateItemError
|
167
244
|
* @throws MissingKeyValuesError
|
168
245
|
*/
|
169
|
-
async createItem(value, transaction = {}) {
|
246
|
+
async createItem(value, transaction = {}, additionalValue = {}) {
|
170
247
|
var _a;
|
171
248
|
this.assertValueMatchesModel(value);
|
172
249
|
const columns = {};
|
@@ -175,13 +252,13 @@ class AbstractDynamoDbRepository {
|
|
175
252
|
}
|
176
253
|
this.convertSelectedValuesToJsonString(columns);
|
177
254
|
const keyFields = {
|
178
|
-
[this.keys.pk.attributeName]: this.getPk(value),
|
179
|
-
[this.keys.sk.attributeName]: this.getSk(value),
|
255
|
+
[this.keys.pk.attributeName]: this.getPk({ ...value, ...additionalValue }),
|
256
|
+
[this.keys.sk.attributeName]: this.getSk({ ...value, ...additionalValue }),
|
180
257
|
};
|
181
258
|
Object.keys(this.indexes).forEach((key) => {
|
182
259
|
const index = this.indexes[key];
|
183
|
-
keyFields[index.pk.attributeName] = this.getKey(value, index.pk.attributeName);
|
184
|
-
keyFields[index.sk.attributeName] = this.getKey(value, index.sk.attributeName);
|
260
|
+
keyFields[index.pk.attributeName] = this.getKey({ ...value, ...additionalValue }, index.pk.attributeName);
|
261
|
+
keyFields[index.sk.attributeName] = this.getKey({ ...value, ...additionalValue }, index.sk.attributeName);
|
185
262
|
});
|
186
263
|
const putCommandInput = {
|
187
264
|
TableName: this.tableName,
|
@@ -346,6 +423,18 @@ class AbstractDynamoDbRepository {
|
|
346
423
|
}
|
347
424
|
return keyFormat;
|
348
425
|
}
|
426
|
+
/**
|
427
|
+
* Whether the given property name is part of the entity's pk/sk string
|
428
|
+
* @param propertyName
|
429
|
+
* @returns boolean
|
430
|
+
*/
|
431
|
+
isPropertyPartOfKeys(propertyName) {
|
432
|
+
if (this.keysFormat[this.keys.pk.attributeName].search(`{${propertyName}}`) !== -1)
|
433
|
+
return true;
|
434
|
+
if (this.keysFormat[this.keys.sk.attributeName].search(`{${propertyName}}`) !== -1)
|
435
|
+
return true;
|
436
|
+
return false;
|
437
|
+
}
|
349
438
|
/**
|
350
439
|
* Validate the data matches with "DATA_MODEL"
|
351
440
|
* @param value
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AbstractDynamoDbRepository.js","sourceRoot":"","sources":["../../src/dynamodb/AbstractDynamoDbRepository.ts"],"names":[],"mappings":";;;AAQA,0BAA+F;AAC/F,4EAAyE;AAsCzE,MAAsB,0BAA0B;IAY9C,YACY,SAAiB,EACjB,SAAwC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D,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;QACrD,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACzC,MAAM,gBAAgB,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3F,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/B,MAAM,IAAI,wBAAoB,CAAC,+BAA+B,IAAI,CAAC,UAAU,KAAK,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SAClH;IACH,CAAC;CACF;AA3fD,gEA2fC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AbstractDynamoDbRepository.spec.d.ts","sourceRoot":"","sources":["../../src/dynamodb/AbstractDynamoDbRepository.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,
|
1
|
+
{"version":3,"file":"AbstractDynamoDbRepository.spec.d.ts","sourceRoot":"","sources":["../../src/dynamodb/AbstractDynamoDbRepository.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAgB,MAAM,8BAA8B,CAAC;AAoBxF,OAAO,EAAE,eAAe,EAAe,MAAM,mBAAmB,CAAC;AAIjE,OAAO,0BAA0B,CAAC;AAQlC,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,cAAM,QAAS,YAAW,SAAS;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;gBAEV,IAAI,GAAE,OAAO,CAAC,SAAS,CAAM;CAoB1C;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;AAgC9D,cAAM,kBAAmB,SAAQ,0BAA0B,CAAC,SAAS,EAAE,QAAQ,CAAC;gBAClE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa;CAGxD"}
|