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

electrodb

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrodb - npm Package Compare versions

Comparing version 0.9.38 to 0.9.39

2

package.json
{
"name": "electrodb",
"version": "0.9.38",
"version": "0.9.39",
"description": "A library to more easily create and interact with multiple entities and heretical relationships in dynamodb",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -459,5 +459,9 @@ "use strict";

_makeCreateConditions(index) {
let filter = [`attribute_not_exists(pk)`];
if (this.model.lookup.indexHasSortKeys[index]) {
filter.push(`attribute_not_exists(sk)`);
let hasSortKey = this.model.lookup.indexHasSortKeys[index];
let accessPattern = this.model.translations.indexes.fromIndexToAccessPattern[index];
let pkField = this.model.indexes[accessPattern].pk.field;
let filter = [`attribute_not_exists(${pkField})`];
if (hasSortKey) {
let skField = this.model.indexes[accessPattern].sk.field;
filter.push(`attribute_not_exists(${skField})`);
}

@@ -468,5 +472,10 @@ return filter.join(" AND ");

_makePatchConditions(index) {
let filter = [`attribute_exists(pk)`];
if (this.model.lookup.indexHasSortKeys[index]) {
filter.push(`attribute_exists(sk)`);
let hasSortKey = this.model.lookup.indexHasSortKeys[index];
let accessPattern = this.model.translations.indexes.fromIndexToAccessPattern[index];
let pkField = this.model.indexes[accessPattern].pk.field;
let filter = [`attribute_exists(${pkField})`];
if (hasSortKey) {
let skField = this.model.indexes[accessPattern].sk.field;
filter.push(`attribute_exists(${skField})`);
}

@@ -586,2 +595,4 @@ return filter.join(" AND ");

let hasSortKey = this.model.lookup.indexHasSortKeys[indexBase];
let accessPattern = this.model.translations.indexes.fromIndexToAccessPattern[indexBase];
let pkField = this.model.indexes[accessPattern].pk.field;
// let facets = this.model.facets.byIndex[indexBase];

@@ -601,3 +612,3 @@ let {pk, sk} = this._makeIndexKeys(indexBase);

),
FilterExpression: `(begins_with(#pk, :pk)`,
FilterExpression: `begins_with(#${pkField}, :${pkField})`,
};

@@ -610,3 +621,4 @@ params.ExpressionAttributeNames["#" + this.identifiers.entity] = this.identifiers.entity;

if (hasSortKey) {
params.FilterExpression = `${params.FilterExpression} AND begins_with(#sk, :sk))`;
let skField = this.model.indexes[accessPattern].sk.field;
params.FilterExpression = `${params.FilterExpression} AND begins_with(#${skField}, :${skField})`;
}

@@ -613,0 +625,0 @@ if (filter.FilterExpression) {

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