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

@qrvey/data-persistence

Package Overview
Dependencies
Maintainers
0
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qrvey/data-persistence - npm Package Compare versions

Comparing version 0.3.8 to 0.3.9-beta-1

dist/esm/postgreSqlCrud.service-ROW7OJIY.mjs

25

dist/cjs/services/cruds/postgresql/postgreSqlClient.service.js

@@ -364,3 +364,2 @@ "use strict";

query += this.buildFilterClause(filters);
console.log('query: ', query);
return this.runQuery(query);

@@ -433,2 +432,3 @@ }

functionExpr: '',
isDynamoFunction: true,
};

@@ -455,8 +455,17 @@ if (columnType == 'array') {

const columnName = arrayPath.shift();
const jsonbInsertExpressions = this.getExpressionsByDefinitionForJSONBInsert(columnName, params.value);
const options = {
isDynamoFunction: params === null || params === void 0 ? void 0 : params.isDynamoFunction,
relativePath: arrayPath.length && Array.isArray(arrayPath) ? arrayPath : [],
};
const jsonbInsertExpressions = this.getExpressionsByDefinitionForJSONBInsert(columnName, params.value, options);
const expressions = this.buildJSONBExpression(jsonbInsertExpressions, 'jsonb_insert');
return expressions;
}
getExpressionsByDefinitionForJSONBInsert(columnName, value) {
getExpressionsByDefinitionForJSONBInsert(columnName, value, options) {
const jsonbInsertExpressions = [];
let pathToAffect = '0';
if (options.isDynamoFunction == true) {
options.relativePath.push('0');
pathToAffect = options.relativePath.join(',');
}
try {

@@ -466,4 +475,8 @@ const parsedValue = JSON.parse(value);

parsedValue.forEach((arrayValue) => {
arrayValue =
typeof arrayValue == 'string'
? `"${arrayValue}"`
: arrayValue;
jsonbInsertExpressions.push({
jsonExpr: `'{0}','${this.serializeJSONValue(arrayValue)}'`,
jsonExpr: `'{${pathToAffect}}','${this.serializeJSONValue(arrayValue)}'`,
columnName: `"${columnName}"`,

@@ -475,3 +488,3 @@ });

jsonbInsertExpressions.push({
jsonExpr: `'{0}','${this.serializeJSONValue(parsedValue)}'`,
jsonExpr: `'{${pathToAffect}}','${this.serializeJSONValue(parsedValue)}'`,
columnName: `"${columnName}"`,

@@ -483,3 +496,3 @@ });

jsonbInsertExpressions.push({
jsonExpr: `'{0}','${value}'`,
jsonExpr: `'{${pathToAffect}}','${value}'`,
columnName: `"${columnName}"`,

@@ -486,0 +499,0 @@ });

@@ -5,3 +5,3 @@ {

"main": "dist/cjs/index.js",
"version": "0.3.8",
"version": "0.3.9-beta-1",
"license": "MIT",

@@ -31,3 +31,3 @@ "exports": {

"publish-package-dev": "yarn prepare-publish && yarn publish-codeartifact",
"publish-package": "yarn prepare-publish && npm publish"
"publish-package": "yarn prepare-publish && npm publish --tag beta"
},

@@ -34,0 +34,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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