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

chaingres

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

chaingres - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

20

chaingres.js
var sq = "";
var pg;
var fromTable;

@@ -26,2 +27,21 @@ module.exports = {

},
"insert": function(ins) {
var v = "";
var ks = "(";
var vs = "(";
Object.keys(ins).map(function(key,index) {
ks += key;
vs += ins[key];
if (index < ins.length - 1) {
ks += ", ";
vs += ", ";
}
})
ks += ")";
vs += ")"
var v = "INSERT INTO " + fromTable + " " + ks + " VALUES " + vs;
sq += v + " ";
return module.exports;
},
"select": function(values) {

@@ -28,0 +48,0 @@ var v = "";

2

package.json
{
"name": "chaingres",
"version": "0.1.1",
"version": "0.1.2",
"description": "Postgres: Unchained. Use cascading style programming to structure your Postgres queries.",

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

@@ -21,4 +21,16 @@ # chaingres

//Example INSERT
chaingres
.new(client)
.insert({
"column1": "value1",
"column2": "value2"
}).then(function(err,result) {
console.log(result);
})
//Example SELECT
chaingres
.new(client)
.select(["c1", "c2"])

@@ -25,0 +37,0 @@ .from("table")

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