Socket
Socket
Sign inDemoInstall

think-model-postgresql

Package Overview
Dependencies
47
Maintainers
8
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.1.3

8

lib/parser.js

@@ -109,2 +109,3 @@ const { Parser } = require('think-model-abstract');

if (helper.isBoolean(value)) return value ? 'true' : 'false';
if (helper.isBuffer(value)) return `'\\x${value.toString('hex')}'`;
if (value === null) return 'null';

@@ -122,2 +123,9 @@ return value;

}
/**
* escape string
* @param {String} str
*/
escapeString(str) {
return str.replace(/'/g, "\\'");
}
};

2

package.json
{
"name": "think-model-postgresql",
"version": "1.1.2",
"version": "1.1.3",
"description": "PostgreSQL adapter for ThinkJS 3.x",

@@ -5,0 +5,0 @@ "scripts": {

@@ -60,2 +60,3 @@ const { test } = require('ava');

['lizheming', "E'lizheming'"],
["I'm my wife's rock.", "E'I\\\'m my wife\\\'s rock.'"],
[3, 3],

@@ -67,3 +68,4 @@ [{ a: 1 }, { a: 1 }],

[['EXP', '= 3'], '= 3'],
[[{ a: 1 }, 3, true, null, ['EXP', ' = 3']], [{ a: 1 }, 3, 'true', 'null', ' = 3']]
[[{ a: 1 }, 3, true, null, ['EXP', ' = 3']], [{ a: 1 }, 3, 'true', 'null', ' = 3']],
[Buffer.from('abcdefg'), "'\\x61626364656667'"]
];

@@ -70,0 +72,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc