@xapp/dynamo-service
Advanced tools
Sorry, the diff of this file is not supported yet
@@ -49,2 +49,3 @@ import { DynamoDB } from "aws-sdk"; | ||
| scan<T, P extends keyof T>(table: string, myParams: ScanParams, projection: P | P[]): Promise<ScanResult<Pick<T, P>>>; | ||
| delete(TableName: string, Key: DynamoDB.DocumentClient.Key): Promise<void>; | ||
| } |
@@ -71,2 +71,8 @@ "use strict"; | ||
| } | ||
| delete(TableName, Key) { | ||
| return this.db.delete({ | ||
| TableName, | ||
| Key | ||
| }).promise().then(r => { }); | ||
| } | ||
| } | ||
@@ -73,0 +79,0 @@ exports.DynamoService = DynamoService; |
@@ -40,2 +40,3 @@ import { DynamoService, QueryParams, QueryResult, ScanParams, ScanResult, UpdateBody, UpdateReturnType } from "./DynamoService"; | ||
| scan<T, P extends keyof T>(params: ScanParams, projection: P | P[]): Promise<Pick<T, P>>; | ||
| delete<T>(key: Partial<T>): Promise<void>; | ||
| } |
@@ -63,3 +63,6 @@ "use strict"; | ||
| } | ||
| delete(key) { | ||
| return this.db.delete(this.tableName, key); | ||
| } | ||
| } | ||
| exports.TableService = TableService; |
+1
-1
| { | ||
| "name": "@xapp/dynamo-service", | ||
| "version": "0.0.31", | ||
| "version": "0.0.32", | ||
| "description": "A dynamo help class which will help maintain data integrity.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
115926
0.3%3191
0.35%