dyno-table 0.2.0-0 → 1.0.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/README.md +182 -577
- package/dist/{table.cjs → index.cjs} +175 -87
- package/dist/index.d.cts +2971 -0
- package/dist/index.d.ts +2971 -0
- package/dist/{table.js → index.js} +127 -86
- package/package.json +10 -77
- package/dist/builder-types-C_PDZhnP.d.ts +0 -118
- package/dist/builder-types-DtwbqMeF.d.cts +0 -118
- package/dist/builders/condition-check-builder.cjs +0 -394
- package/dist/builders/condition-check-builder.cjs.map +0 -1
- package/dist/builders/condition-check-builder.d.cts +0 -157
- package/dist/builders/condition-check-builder.d.ts +0 -157
- package/dist/builders/condition-check-builder.js +0 -392
- package/dist/builders/condition-check-builder.js.map +0 -1
- package/dist/builders/delete-builder.cjs +0 -405
- package/dist/builders/delete-builder.cjs.map +0 -1
- package/dist/builders/delete-builder.d.cts +0 -166
- package/dist/builders/delete-builder.d.ts +0 -166
- package/dist/builders/delete-builder.js +0 -403
- package/dist/builders/delete-builder.js.map +0 -1
- package/dist/builders/paginator.cjs +0 -199
- package/dist/builders/paginator.cjs.map +0 -1
- package/dist/builders/paginator.d.cts +0 -179
- package/dist/builders/paginator.d.ts +0 -179
- package/dist/builders/paginator.js +0 -197
- package/dist/builders/paginator.js.map +0 -1
- package/dist/builders/put-builder.cjs +0 -476
- package/dist/builders/put-builder.cjs.map +0 -1
- package/dist/builders/put-builder.d.cts +0 -274
- package/dist/builders/put-builder.d.ts +0 -274
- package/dist/builders/put-builder.js +0 -474
- package/dist/builders/put-builder.js.map +0 -1
- package/dist/builders/query-builder.cjs +0 -674
- package/dist/builders/query-builder.cjs.map +0 -1
- package/dist/builders/query-builder.d.cts +0 -6
- package/dist/builders/query-builder.d.ts +0 -6
- package/dist/builders/query-builder.js +0 -672
- package/dist/builders/query-builder.js.map +0 -1
- package/dist/builders/transaction-builder.cjs +0 -894
- package/dist/builders/transaction-builder.cjs.map +0 -1
- package/dist/builders/transaction-builder.d.cts +0 -511
- package/dist/builders/transaction-builder.d.ts +0 -511
- package/dist/builders/transaction-builder.js +0 -892
- package/dist/builders/transaction-builder.js.map +0 -1
- package/dist/builders/update-builder.cjs +0 -627
- package/dist/builders/update-builder.cjs.map +0 -1
- package/dist/builders/update-builder.d.cts +0 -365
- package/dist/builders/update-builder.d.ts +0 -365
- package/dist/builders/update-builder.js +0 -625
- package/dist/builders/update-builder.js.map +0 -1
- package/dist/conditions--ld9a78i.d.ts +0 -331
- package/dist/conditions-ChhQWd6z.d.cts +0 -331
- package/dist/conditions.cjs +0 -59
- package/dist/conditions.cjs.map +0 -1
- package/dist/conditions.d.cts +0 -3
- package/dist/conditions.d.ts +0 -3
- package/dist/conditions.js +0 -43
- package/dist/conditions.js.map +0 -1
- package/dist/entity.cjs +0 -228
- package/dist/entity.cjs.map +0 -1
- package/dist/entity.d.cts +0 -149
- package/dist/entity.d.ts +0 -149
- package/dist/entity.js +0 -224
- package/dist/entity.js.map +0 -1
- package/dist/query-builder-Csror9Iu.d.ts +0 -507
- package/dist/query-builder-D2FM9rsu.d.cts +0 -507
- package/dist/standard-schema.cjs +0 -4
- package/dist/standard-schema.cjs.map +0 -1
- package/dist/standard-schema.d.cts +0 -57
- package/dist/standard-schema.d.ts +0 -57
- package/dist/standard-schema.js +0 -3
- package/dist/standard-schema.js.map +0 -1
- package/dist/table-BEhBPy2G.d.cts +0 -364
- package/dist/table-BW3cmUqr.d.ts +0 -364
- package/dist/table.cjs.map +0 -1
- package/dist/table.d.cts +0 -12
- package/dist/table.d.ts +0 -12
- package/dist/table.js.map +0 -1
- package/dist/types.cjs +0 -4
- package/dist/types.cjs.map +0 -1
- package/dist/types.d.cts +0 -22
- package/dist/types.d.ts +0 -22
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/utils/partition-key-template.cjs +0 -19
- package/dist/utils/partition-key-template.cjs.map +0 -1
- package/dist/utils/partition-key-template.d.cts +0 -32
- package/dist/utils/partition-key-template.d.ts +0 -32
- package/dist/utils/partition-key-template.js +0 -17
- package/dist/utils/partition-key-template.js.map +0 -1
- package/dist/utils/sort-key-template.cjs +0 -19
- package/dist/utils/sort-key-template.cjs.map +0 -1
- package/dist/utils/sort-key-template.d.cts +0 -35
- package/dist/utils/sort-key-template.d.ts +0 -35
- package/dist/utils/sort-key-template.js +0 -17
- package/dist/utils/sort-key-template.js.map +0 -1
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
import { DynamoItem, TableConfig, Index } from './types.cjs';
|
|
2
|
-
import { P as PrimaryKeyWithoutExpression, a as PrimaryKey } from './conditions-ChhQWd6z.cjs';
|
|
3
|
-
import { F as FilterBuilder, a as FilterOptions, Q as QueryBuilder } from './query-builder-D2FM9rsu.cjs';
|
|
4
|
-
import { PutBuilder } from './builders/put-builder.cjs';
|
|
5
|
-
import { DeleteBuilder } from './builders/delete-builder.cjs';
|
|
6
|
-
import { UpdateBuilder } from './builders/update-builder.cjs';
|
|
7
|
-
import { TransactionBuilder, TransactionOptions } from './builders/transaction-builder.cjs';
|
|
8
|
-
import { ConditionCheckBuilder } from './builders/condition-check-builder.cjs';
|
|
9
|
-
import { S as ScanBuilderInterface } from './builder-types-DtwbqMeF.cjs';
|
|
10
|
-
|
|
11
|
-
type BatchWriteOperation<T extends Record<string, unknown>> = {
|
|
12
|
-
type: "put";
|
|
13
|
-
item: T;
|
|
14
|
-
} | {
|
|
15
|
-
type: "delete";
|
|
16
|
-
key: PrimaryKeyWithoutExpression;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Parameters for the DynamoDB get command.
|
|
21
|
-
*/
|
|
22
|
-
interface GetCommandParams {
|
|
23
|
-
/** The name of the DynamoDB table */
|
|
24
|
-
tableName: string;
|
|
25
|
-
/** The primary key of the item to get */
|
|
26
|
-
key: PrimaryKeyWithoutExpression;
|
|
27
|
-
/** Comma-separated list of attributes to return */
|
|
28
|
-
projectionExpression?: string;
|
|
29
|
-
/** Map of expression attribute name placeholders to actual names */
|
|
30
|
-
expressionAttributeNames?: Record<string, string>;
|
|
31
|
-
/** Whether to use strongly consistent reads */
|
|
32
|
-
consistentRead?: boolean;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Function type for executing DynamoDB get operations.
|
|
36
|
-
* @typeParam T - The type of item being retrieved
|
|
37
|
-
*/
|
|
38
|
-
type GetExecutor<T extends DynamoItem> = (params: GetCommandParams) => Promise<{
|
|
39
|
-
item: T | undefined;
|
|
40
|
-
}>;
|
|
41
|
-
/**
|
|
42
|
-
* Builder for creating DynamoDB get operations.
|
|
43
|
-
* Use this builder when you need to:
|
|
44
|
-
* - Retrieve a single dinosaur by its primary key
|
|
45
|
-
* - Project specific dinosaur attributes
|
|
46
|
-
* - Use consistent reads for critical dinosaur data
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```typescript
|
|
50
|
-
* // Simple get
|
|
51
|
-
* const result = await new GetBuilder(executor, { pk: 'dinosaur#123', sk: 'profile' })
|
|
52
|
-
* .execute();
|
|
53
|
-
*
|
|
54
|
-
* // Get with projection and consistent read
|
|
55
|
-
* const result = await new GetBuilder(executor, { pk: 'dinosaur#123', sk: 'profile' })
|
|
56
|
-
* .select(['species', 'name', 'diet'])
|
|
57
|
-
* .consistentRead()
|
|
58
|
-
* .execute();
|
|
59
|
-
* ```
|
|
60
|
-
*
|
|
61
|
-
* @typeParam T - The type of item being retrieved
|
|
62
|
-
*/
|
|
63
|
-
declare class GetBuilder<T extends DynamoItem> {
|
|
64
|
-
private readonly executor;
|
|
65
|
-
private readonly params;
|
|
66
|
-
private options;
|
|
67
|
-
private selectedFields;
|
|
68
|
-
/**
|
|
69
|
-
* Creates a new GetBuilder instance.
|
|
70
|
-
*
|
|
71
|
-
* @param executor - Function that executes the get operation
|
|
72
|
-
* @param key - Primary key of the item to retrieve
|
|
73
|
-
* @param tableName - Name of the DynamoDB table
|
|
74
|
-
*/
|
|
75
|
-
constructor(executor: GetExecutor<T>, key: PrimaryKeyWithoutExpression, tableName: string);
|
|
76
|
-
/**
|
|
77
|
-
* Specifies which attributes to return in the get results.
|
|
78
|
-
* Use this method when you need to:
|
|
79
|
-
* - Reduce data transfer by selecting specific dinosaur attributes
|
|
80
|
-
* - Optimize response size for dinosaur records
|
|
81
|
-
* - Focus on relevant dinosaur characteristics only
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```typescript
|
|
85
|
-
* // Select single attribute
|
|
86
|
-
* builder.select('species')
|
|
87
|
-
*
|
|
88
|
-
* // Select multiple attributes
|
|
89
|
-
* builder.select(['id', 'species', 'diet'])
|
|
90
|
-
*
|
|
91
|
-
* // Chain multiple select calls
|
|
92
|
-
* builder
|
|
93
|
-
* .select('id')
|
|
94
|
-
* .select(['species', 'diet'])
|
|
95
|
-
* ```
|
|
96
|
-
*
|
|
97
|
-
* @param fields - A single field name or an array of field names to return
|
|
98
|
-
* @returns The builder instance for method chaining
|
|
99
|
-
*/
|
|
100
|
-
select(fields: string | string[]): GetBuilder<T>;
|
|
101
|
-
/**
|
|
102
|
-
* Sets whether to use strongly consistent reads for the get operation.
|
|
103
|
-
* Use this method when you need:
|
|
104
|
-
* - The most up-to-date dinosaur data
|
|
105
|
-
* - To ensure you're reading the latest dinosaur status
|
|
106
|
-
* - Critical safety information about dangerous species
|
|
107
|
-
*
|
|
108
|
-
* Note: Consistent reads consume twice the throughput
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
* ```typescript
|
|
112
|
-
* // Get the latest T-Rex data
|
|
113
|
-
* const result = await new GetBuilder(executor, { pk: 'dinosaur#123', sk: 'profile' })
|
|
114
|
-
* .consistentRead()
|
|
115
|
-
* .execute();
|
|
116
|
-
* ```
|
|
117
|
-
*
|
|
118
|
-
* @param consistentRead - Whether to use consistent reads (defaults to true)
|
|
119
|
-
* @returns The builder instance for method chaining
|
|
120
|
-
*/
|
|
121
|
-
consistentRead(consistentRead?: boolean): GetBuilder<T>;
|
|
122
|
-
/**
|
|
123
|
-
* Executes the get operation against DynamoDB.
|
|
124
|
-
*
|
|
125
|
-
* @example
|
|
126
|
-
* ```typescript
|
|
127
|
-
* try {
|
|
128
|
-
* const result = await new GetBuilder(executor, { pk: 'dinosaur#123', sk: 'profile' })
|
|
129
|
-
* .select(['species', 'name', 'diet'])
|
|
130
|
-
* .consistentRead()
|
|
131
|
-
* .execute();
|
|
132
|
-
*
|
|
133
|
-
* if (result.item) {
|
|
134
|
-
* console.log('Dinosaur found:', result.item);
|
|
135
|
-
* } else {
|
|
136
|
-
* console.log('Dinosaur not found');
|
|
137
|
-
* }
|
|
138
|
-
* } catch (error) {
|
|
139
|
-
* console.error('Error getting dinosaur:', error);
|
|
140
|
-
* }
|
|
141
|
-
* ```
|
|
142
|
-
*
|
|
143
|
-
* @returns A promise that resolves to an object containing:
|
|
144
|
-
* - item: The retrieved dinosaur or undefined if not found
|
|
145
|
-
*/
|
|
146
|
-
execute(): Promise<{
|
|
147
|
-
item: T | undefined;
|
|
148
|
-
}>;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Configuration options for DynamoDB scan operations.
|
|
153
|
-
* Extends the base FilterOptions.
|
|
154
|
-
*/
|
|
155
|
-
type ScanOptions = FilterOptions;
|
|
156
|
-
/**
|
|
157
|
-
* Function type for executing DynamoDB filter operations.
|
|
158
|
-
* @typeParam T - The type of items being filtered
|
|
159
|
-
*/
|
|
160
|
-
type ScanExecutor<T extends DynamoItem> = (options: ScanOptions) => Promise<{
|
|
161
|
-
items: T[];
|
|
162
|
-
lastEvaluatedKey?: DynamoItem;
|
|
163
|
-
}>;
|
|
164
|
-
/**
|
|
165
|
-
* Builder for creating DynamoDB scan operations.
|
|
166
|
-
* Use this builder when you need to:
|
|
167
|
-
* - Scan all items in a table
|
|
168
|
-
* - Filter results based on non-key attributes
|
|
169
|
-
* - Scan items on a Secondary Index (GSI)
|
|
170
|
-
* - Implement pagination
|
|
171
|
-
* - Project specific attributes
|
|
172
|
-
*
|
|
173
|
-
* The builder supports:
|
|
174
|
-
* - Type-safe GSI selection
|
|
175
|
-
* - Complex filter conditions
|
|
176
|
-
* - Automatic pagination handling
|
|
177
|
-
* - Consistent reads
|
|
178
|
-
* - Attribute projection
|
|
179
|
-
*
|
|
180
|
-
* @example
|
|
181
|
-
* ```typescript
|
|
182
|
-
* // Simple scan with filtering
|
|
183
|
-
* const result = await new ScanBuilder(executor)
|
|
184
|
-
* .filter(op => op.eq('status', 'ACTIVE'))
|
|
185
|
-
* .execute();
|
|
186
|
-
*
|
|
187
|
-
* // Scan with GSI and filtering
|
|
188
|
-
* const result = await new ScanBuilder(executor)
|
|
189
|
-
* .useIndex('status-index')
|
|
190
|
-
* .filter(op => op.gt('securityLevel', 8))
|
|
191
|
-
* .select(['id', 'capacity', 'currentOccupants'])
|
|
192
|
-
* .limit(10)
|
|
193
|
-
* .execute();
|
|
194
|
-
*
|
|
195
|
-
* // Scan with pagination
|
|
196
|
-
* const paginator = new ScanBuilder(executor)
|
|
197
|
-
* .filter(op => op.eq('type', 'INCIDENT'))
|
|
198
|
-
* .paginate(25);
|
|
199
|
-
*
|
|
200
|
-
* while (paginator.hasNextPage()) {
|
|
201
|
-
* const page = await paginator.getNextPage();
|
|
202
|
-
* // Process page.items
|
|
203
|
-
* }
|
|
204
|
-
* ```
|
|
205
|
-
*
|
|
206
|
-
* @typeParam T - The type of items being scanned
|
|
207
|
-
* @typeParam TConfig - The table configuration type for type-safe GSI selection
|
|
208
|
-
*/
|
|
209
|
-
declare class ScanBuilder<T extends DynamoItem, TConfig extends TableConfig = TableConfig> extends FilterBuilder<T, TConfig> implements ScanBuilderInterface<T, TConfig> {
|
|
210
|
-
protected readonly executor: ScanExecutor<T>;
|
|
211
|
-
constructor(executor: ScanExecutor<T>);
|
|
212
|
-
/**
|
|
213
|
-
* Creates a deep clone of this ScanBuilder instance.
|
|
214
|
-
* Use this method when you need to:
|
|
215
|
-
* - Create scan templates
|
|
216
|
-
* - Run multiple variations of a scan
|
|
217
|
-
* - Implement pagination (used internally by paginate())
|
|
218
|
-
*
|
|
219
|
-
* @returns A new ScanBuilder instance with the same configuration
|
|
220
|
-
*/
|
|
221
|
-
clone(): ScanBuilder<T, TConfig>;
|
|
222
|
-
/**
|
|
223
|
-
* Executes the scan against DynamoDB.
|
|
224
|
-
* Use this method when you need to:
|
|
225
|
-
* - Search across the entire table
|
|
226
|
-
* - Find items matching specific criteria
|
|
227
|
-
* - Perform full table analysis
|
|
228
|
-
* - Generate reports across all data
|
|
229
|
-
*
|
|
230
|
-
* The method returns both the matched items and, if there are more results,
|
|
231
|
-
* a lastEvaluatedKey that can be used with startFrom() to continue the scan.
|
|
232
|
-
*
|
|
233
|
-
* @example
|
|
234
|
-
* ```typescript
|
|
235
|
-
* try {
|
|
236
|
-
* // Find all dinosaurs with high aggression levels
|
|
237
|
-
* const result = await new ScanBuilder(executor)
|
|
238
|
-
* .filter(op =>
|
|
239
|
-
* op.and([
|
|
240
|
-
* op.eq('status', 'ACTIVE'),
|
|
241
|
-
* op.gt('aggressionLevel', 7)
|
|
242
|
-
* ])
|
|
243
|
-
* )
|
|
244
|
-
* .limit(20)
|
|
245
|
-
* .execute();
|
|
246
|
-
*
|
|
247
|
-
* console.log(`Found ${result.items.length} potentially dangerous dinosaurs`);
|
|
248
|
-
*
|
|
249
|
-
* if (result.lastEvaluatedKey) {
|
|
250
|
-
* console.log('More results available');
|
|
251
|
-
* }
|
|
252
|
-
* } catch (error) {
|
|
253
|
-
* console.error('Security scan failed:', error);
|
|
254
|
-
* }
|
|
255
|
-
* ```
|
|
256
|
-
*
|
|
257
|
-
* @returns A promise that resolves to an object containing:
|
|
258
|
-
* - items: Array of items matching the scan criteria
|
|
259
|
-
* - lastEvaluatedKey: Token for continuing the scan, if more items exist
|
|
260
|
-
*/
|
|
261
|
-
execute(): Promise<{
|
|
262
|
-
items: T[];
|
|
263
|
-
lastEvaluatedKey?: Record<string, unknown>;
|
|
264
|
-
}>;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
declare class Table<TConfig extends TableConfig = TableConfig> {
|
|
268
|
-
private readonly dynamoClient;
|
|
269
|
-
readonly tableName: string;
|
|
270
|
-
/**
|
|
271
|
-
* The column name of the partitionKey for the Table
|
|
272
|
-
*/
|
|
273
|
-
readonly partitionKey: string;
|
|
274
|
-
/**
|
|
275
|
-
* The column name of the sortKey for the Table
|
|
276
|
-
*/
|
|
277
|
-
readonly sortKey?: string;
|
|
278
|
-
/**
|
|
279
|
-
* The Global Secondary Indexes that are configured on this table
|
|
280
|
-
*/
|
|
281
|
-
readonly gsis: Record<string, Index>;
|
|
282
|
-
constructor(config: TConfig);
|
|
283
|
-
protected createKeyForPrimaryIndex(keyCondition: PrimaryKeyWithoutExpression): Record<string, unknown>;
|
|
284
|
-
/**
|
|
285
|
-
* Creates a new item in the table, it will fail if the item already exists
|
|
286
|
-
*
|
|
287
|
-
* @param item The item to create
|
|
288
|
-
* @returns A PutBuilder instance for chaining conditions and executing the put operation
|
|
289
|
-
*/
|
|
290
|
-
create<T extends DynamoItem>(item: T): PutBuilder<T>;
|
|
291
|
-
get<T extends DynamoItem>(keyCondition: PrimaryKeyWithoutExpression): GetBuilder<T>;
|
|
292
|
-
/**
|
|
293
|
-
* Updates an item in the table
|
|
294
|
-
*
|
|
295
|
-
* @param item The item to update
|
|
296
|
-
* @returns A PutBuilder instance for chaining conditions and executing the put operation
|
|
297
|
-
*/
|
|
298
|
-
put<T extends DynamoItem>(item: T): PutBuilder<T>;
|
|
299
|
-
/**
|
|
300
|
-
* Creates a query builder for complex queries
|
|
301
|
-
* If useIndex is called on the returned QueryBuilder, it will use the GSI configuration
|
|
302
|
-
*/
|
|
303
|
-
query<T extends DynamoItem>(keyCondition: PrimaryKey): QueryBuilder<T, TConfig>;
|
|
304
|
-
/**
|
|
305
|
-
* Creates a scan builder for scanning the entire table
|
|
306
|
-
* Use this when you need to:
|
|
307
|
-
* - Process all items in a table
|
|
308
|
-
* - Apply filters to a large dataset
|
|
309
|
-
* - Use a GSI for scanning
|
|
310
|
-
*
|
|
311
|
-
* @returns A ScanBuilder instance for chaining operations
|
|
312
|
-
*/
|
|
313
|
-
scan<T extends DynamoItem>(): ScanBuilder<T, TConfig>;
|
|
314
|
-
delete(keyCondition: PrimaryKeyWithoutExpression): DeleteBuilder;
|
|
315
|
-
/**
|
|
316
|
-
* Updates an item in the table
|
|
317
|
-
*
|
|
318
|
-
* @param keyCondition The primary key of the item to update
|
|
319
|
-
* @returns An UpdateBuilder instance for chaining update operations and conditions
|
|
320
|
-
*/
|
|
321
|
-
update<T extends DynamoItem>(keyCondition: PrimaryKeyWithoutExpression): UpdateBuilder<T>;
|
|
322
|
-
/**
|
|
323
|
-
* Creates a transaction builder for performing multiple operations atomically
|
|
324
|
-
*/
|
|
325
|
-
transactionBuilder(): TransactionBuilder;
|
|
326
|
-
/**
|
|
327
|
-
* Executes a transaction using a callback function
|
|
328
|
-
*
|
|
329
|
-
* @param callback A function that receives a transaction context and performs operations on it
|
|
330
|
-
* @param options Optional transaction options
|
|
331
|
-
* @returns A promise that resolves when the transaction is complete
|
|
332
|
-
*/
|
|
333
|
-
transaction<T>(callback: (tx: TransactionBuilder) => Promise<T>, options?: TransactionOptions): Promise<T>;
|
|
334
|
-
/**
|
|
335
|
-
* Creates a condition check operation for use in transactions
|
|
336
|
-
*
|
|
337
|
-
* This is useful for when you require a transaction to succeed only when a specific condition is met on a
|
|
338
|
-
* a record within the database that you are not directly updating.
|
|
339
|
-
*
|
|
340
|
-
* For example, you are updating a record and you want to ensure that another record exists and/or has a specific value before proceeding.
|
|
341
|
-
*/
|
|
342
|
-
conditionCheck(keyCondition: PrimaryKeyWithoutExpression): ConditionCheckBuilder;
|
|
343
|
-
/**
|
|
344
|
-
* Performs a batch get operation to retrieve multiple items at once
|
|
345
|
-
*
|
|
346
|
-
* @param keys Array of primary keys to retrieve
|
|
347
|
-
* @returns A promise that resolves to the retrieved items
|
|
348
|
-
*/
|
|
349
|
-
batchGet<T extends DynamoItem>(keys: Array<PrimaryKeyWithoutExpression>): Promise<{
|
|
350
|
-
items: T[];
|
|
351
|
-
unprocessedKeys: PrimaryKeyWithoutExpression[];
|
|
352
|
-
}>;
|
|
353
|
-
/**
|
|
354
|
-
* Performs a batch write operation to put or delete multiple items at once
|
|
355
|
-
*
|
|
356
|
-
* @param operations Array of put or delete operations
|
|
357
|
-
* @returns A promise that resolves to any unprocessed operations
|
|
358
|
-
*/
|
|
359
|
-
batchWrite<T extends DynamoItem>(operations: Array<BatchWriteOperation<T>>): Promise<{
|
|
360
|
-
unprocessedItems: Array<BatchWriteOperation<T>>;
|
|
361
|
-
}>;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
export { GetBuilder as G, ScanBuilder as S, Table as T };
|