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

psy-db

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

psy-db - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "psy-db",
"version": "1.0.1",
"version": "1.0.2",
"author": "Armin Neische",

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

@@ -189,4 +189,4 @@ /*

sql = sql.substr(0, sql.length - 1);
sql += ')';
sql = sql.substr(0, sql.length - 1)
sql += ') RETURNING *';
client = new Client({

@@ -199,3 +199,3 @@ connectionString: config.connStr

client.end();
resolve(res.rowCount);
resolve(res.rows[0]);
})

@@ -202,0 +202,0 @@ .catch(err => {

@@ -16,3 +16,2 @@ /*

var account = {
id: 1,
companyname: 'PSYfiers AG',

@@ -28,13 +27,33 @@ users: [

db.read({
//db.read({
// table: 'accounts',
// query: {
// id: 1
// },
// resolve: {
// country_id: {table: 'countries', field: 'country', id: 'id'}
// }
//}).then(data => {
// console.log(data);
//}).catch(err => {
// console.log(err);
//});
db.create({
table: 'accounts',
query: {
id: 1
entity: account,
resolve: {
country: {field: 'country_id', value: account.country.id}
},
resolve: {
country_id: {table: 'countries', field: 'country', id: 'id'}
}
}).then(data => {
console.log(data);
}).catch(err => {
columns: {
companyname: 'company_name'
},
ignore: [
'users'
]
}).then((data => {
console.log(data);
})).catch(err => {
console.log(err);

@@ -45,47 +64,4 @@ });

//db.create({
// table: 'accounts',
// entity: account,
// resolve: {
// country: {field: 'country_id', value: account.country.id}
// },
// columns: {
// companyname: 'company_name'
// },
// ignore: [
// 'users'
// ]
//}).then((data => {
// account['postcode'] = '1000';
// account['city'] = 'Neuchatel';
// account['street'] = 'Le Lac 101a';
//
// db.update({
// table: 'accounts',
// entity: account,
// query: {
// id: account.id
// },
// resolve: {
// country: {field: 'country_id', value: account.country.id}
// },
// columns: {
// companyname: 'company_name'
// },
// ignore: [
// 'users'
// ]
// }).then((data => {
// console.log(data);
// })).catch(err => {
// console.log(err);
// });
//})).catch(err => {
// console.log(err);
//});
//db.create({

@@ -92,0 +68,0 @@ // table: 'countries',

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