Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xapp/dynamo-service

Package Overview
Dependencies
Maintainers
6
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xapp/dynamo-service - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

xapp-dynamo-service-1.1.0.tgz

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Changelog

## [1.2.0](https://github.com/XappMedia/dynamo-service/compare/v1.1.0...v1.2.0) (2019-08-06)
### Features
* Query count ([6a03d2b](https://github.com/XappMedia/dynamo-service/commit/6a03d2b))
## [1.1.0](https://github.com/XappMedia/dynamo-service/compare/v0.2.3...v1.1.0) (2019-07-18)

@@ -7,0 +16,0 @@

@@ -8,2 +8,5 @@ import { DynamoDB } from "aws-sdk";

}
export interface QueryCountResult {
Count: number;
}
export interface ScanResult<T> {

@@ -23,2 +26,3 @@ Items: T[];

}
export declare type QueryCountParams = Pick<QueryParams, "KeyConditionExpression" | "FilterExpression" | "ExpressionAttributeNames" | "ExpressionAttributeValues" | "IndexName">;
export interface ScanParams {

@@ -92,2 +96,3 @@ IndexName?: string;

query<T>(table: string, myParams: QueryParams, projection: string[]): Promise<QueryResult<Partial<T>>>;
count(table: string, myParams: QueryCountParams): Promise<QueryCountResult>;
scan<T>(table: string, myParams: ScanParams): Promise<ScanResult<T>>;

@@ -94,0 +99,0 @@ scan<T, P extends keyof T>(table: string, myParams: ScanParams, projection: P): Promise<ScanResult<Pick<T, P>>>;

@@ -111,2 +111,16 @@ "use strict";

}
count(table, myParams) {
const params = {
TableName: table,
Select: "COUNT"
};
addIfExists(params, myParams, [
"KeyConditionExpression",
"FilterExpression",
"ExpressionAttributeNames",
"ExpressionAttributeValues",
"IndexName"
]);
return this.db.query(params).promise();
}
scan(table, myParams, projection) {

@@ -113,0 +127,0 @@ const params = {

3

dist/service/TableService/TableService.d.ts
import { DynamoDB } from "aws-sdk";
import { ConditionExpression, DynamoService, QueryParams, QueryResult, ScanParams, ScanResult, UpdateBody, UpdateReturnAllType, UpdateReturnNoneType, UpdateReturnType, UpdateReturnUpdatedType } from "../DynamoService";
import { ConditionExpression, DynamoService, QueryCountParams, QueryCountResult, QueryParams, QueryResult, ScanParams, ScanResult, UpdateBody, UpdateReturnAllType, UpdateReturnNoneType, UpdateReturnType, UpdateReturnUpdatedType } from "../DynamoService";
import { KeySchema, TableSchema } from "../KeySchema";

@@ -47,2 +47,3 @@ import { ValidationError } from "../ValidationError";

query(params: QueryParams, projection: string[]): Promise<QueryResult<Partial<T>>>;
count(params: QueryCountParams): Promise<QueryCountResult>;
scan(params: ScanParams): Promise<ScanResult<T>>;

@@ -49,0 +50,0 @@ scan<P extends keyof T>(params: ScanParams, projection: P | P[]): Promise<ScanResult<Pick<T, P>>>;

@@ -65,2 +65,5 @@ "use strict";

}
count(params) {
return this.db.count(this.tableName, params);
}
scan(params, projection) {

@@ -67,0 +70,0 @@ const realProjection = (projection || this.knownKeys);

{
"name": "@xapp/dynamo-service",
"version": "1.1.0",
"version": "1.2.0",
"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 too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc