@xapp/dynamo-service
Advanced tools
Comparing version 1.0.0-alpha.3 to 1.0.0-alpha.4
@@ -15,3 +15,2 @@ "use strict"; | ||
const Object_1 = require("../utils/Object"); | ||
const String_1 = require("../utils/String"); | ||
const ValidationError_1 = require("./ValidationError"); | ||
@@ -264,4 +263,4 @@ exports.MAX_PUT_ALL_ATTEMPTS = 15; | ||
if (set.hasOwnProperty(key)) { | ||
const alias = "#__dynoservice_" + String_1.randomString(); | ||
const name = ":__dynoservice_a" + ++index; | ||
const alias = "#__dynoservice_updateset_a" + index; | ||
const name = ":__dynoservice_updateset_a" + ++index; | ||
setExpression += alias + " = " + name + ","; | ||
@@ -280,7 +279,7 @@ setValues[name] = set[key]; | ||
if (append.hasOwnProperty(key)) { | ||
const alias = "#__dynoservice_append_" + String_1.randomString(); | ||
const name = ":__dynoservice_c" + ++index; | ||
setExpression += alias + " = list_append(if_not_exists(" + alias + ", :__dynoservice_append_empty_list)," + name + "),"; | ||
const alias = "#__dynoservice_updateappend_c" + index; | ||
const name = ":__dynoservice_updateappend_c" + ++index; | ||
setExpression += alias + " = list_append(if_not_exists(" + alias + ", :__dynoservice_update_append_empty_list)," + name + "),"; | ||
setValues[name] = append[key]; | ||
setValues[":__dynoservice_append_empty_list"] = []; | ||
setValues[":__dynoservice_update_append_empty_list"] = []; | ||
setAliasMap[alias] = key; | ||
@@ -294,4 +293,4 @@ } | ||
setExpression = setExpression ? setExpression.substr(0, setExpression.length - 1) + " remove " : "remove "; | ||
remove.forEach((key) => { | ||
const alias = "#__dynoservice_" + String_1.randomString(); | ||
remove.forEach((key, index) => { | ||
const alias = "#__dynoservice_updateremove_r" + index; | ||
setExpression += alias + ","; | ||
@@ -298,0 +297,0 @@ setAliasMap[alias] = key; |
@@ -36,20 +36,13 @@ import { DynamoDB } from "aws-sdk"; | ||
get<P extends keyof T>(key: Partial<T>[]): Promise<T[]>; | ||
get<P extends keyof T>(key: Partial<T>, projection: P): Promise<Pick<T, P>>; | ||
get<P extends keyof T>(key: Partial<T>, projection: P[]): Promise<Pick<T, P>>; | ||
get<P extends keyof T>(key: Partial<T>[], projection: P): Promise<Pick<T, P>[]>; | ||
get<P extends keyof T>(key: Partial<T>[], projection: P[]): Promise<Pick<T, P>[]>; | ||
get<P extends keyof T>(key: Partial<T>, projection: string): Promise<Partial<T>>; | ||
get<P extends keyof T>(key: Partial<T>, projection: string[]): Promise<Partial<T>>; | ||
get<P extends keyof T>(key: Partial<T>[], projection: string): Promise<Partial<T>[]>; | ||
get<P extends keyof T>(key: Partial<T>[], projection: string[]): Promise<Partial<T>[]>; | ||
get<P extends keyof T>(key: Partial<T>, projection: P | P[]): Promise<Pick<T, P>>; | ||
get<P extends keyof T>(key: Partial<T>[], projection: P | P[]): Promise<Pick<T, P>[]>; | ||
get<P extends keyof T>(key: Partial<T>, projection: string | string[]): Promise<Partial<T>>; | ||
get<P extends keyof T>(key: Partial<T>[], projection: string | string[]): Promise<Partial<T>[]>; | ||
query(params: QueryParams): Promise<QueryResult<T>>; | ||
query<P extends keyof T>(params: QueryParams, projection: P): Promise<QueryResult<Pick<T, P>>>; | ||
query<P extends keyof T>(params: QueryParams, projection: P[]): Promise<QueryResult<Pick<T, P>>>; | ||
query<P extends keyof T>(params: QueryParams, projection: P | P[]): Promise<QueryResult<Pick<T, P>>>; | ||
query(params: QueryParams, projection: string): Promise<QueryResult<Partial<T>>>; | ||
query(params: QueryParams, projection: string[]): Promise<QueryResult<Partial<T>>>; | ||
scan(params: ScanParams): Promise<ScanResult<T>>; | ||
scan<P extends keyof T>(params: ScanParams, projection: P): Promise<ScanResult<Pick<T, P>>>; | ||
scan<P extends keyof T>(params: ScanParams, projection: P[]): Promise<ScanResult<Pick<T, P>>>; | ||
scan(params: ScanParams, projection: string): Promise<ScanResult<Partial<T>>>; | ||
scan(params: ScanParams, projection: string[]): Promise<ScanResult<Partial<T>>>; | ||
scan<P extends keyof T>(params: ScanParams, projection: P | P[]): Promise<ScanResult<Pick<T, P>>>; | ||
scan(params: ScanParams, projection: string | string[]): Promise<ScanResult<Partial<T>>>; | ||
delete(key: Partial<T> | Partial<T>[]): Promise<void>; | ||
@@ -56,0 +49,0 @@ private convertObjectsReturnedFromDynamo; |
{ | ||
"name": "@xapp/dynamo-service", | ||
"version": "1.0.0-alpha.3", | ||
"version": "1.0.0-alpha.4", | ||
"description": "A dynamo help class which will help maintain data integrity.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
281518
5133