New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

json-schema-table

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-schema-table - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

4

package.json
{
"name": "json-schema-table",
"version": "0.1.1",
"version": "0.1.2",
"description": "Creates and maintains a SQL table structure",

@@ -33,3 +33,3 @@ "homepage": "",

"mssql": "^2.1.8",
"pg-promise": "^1.8.5",
"pg": "^4.4.1",
"pretty-hrtime": "^1.0.0"

@@ -36,0 +36,0 @@ },

@@ -518,3 +518,3 @@ var _ = require('lodash');

case 'number':
if (property.decimals) {
if (property.decimals && property.decimals > 0) {
column = 'NUMERIC(' + property.maxLength + ',' + property.decimals + ')';

@@ -684,7 +684,20 @@ } else {

//log('execute', command);
return db.none(command);
return this.query(command);
},
query: function(command) {
//log('query', command);
return db.query(command);
return new Promise(function(resolve, reject) {
db.connect(function(err, client, done) {
if (err) return reject(err);
client.query(command, function(err, result) {
if (err) {
done();
reject(err);
return;
}
done();
resolve(result.rows);
});
});
});
}

@@ -716,3 +729,3 @@ };

function isPostgres(db) {
return db.oneOrNone !== void 0; //todo identify in a better way
return typeof db.defaults === 'object'; //todo identify in a better way
}

@@ -719,0 +732,0 @@

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