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.0 to 0.1.1

16

chaingres.js
var sq = "";
var pg;
module.exports = {
"then": function(promise) {
return promise(sq);
if (!pg) {
var s = sq;
sq = "";
return promise(sq);
} else {
pg.query(sq, function(err,result) {
sq = "";
return promise(err,result);
})
}
},
"new": function() {
"new": function(postgres) {
sq = "";
pg = postgres;
return module.exports;

@@ -9,0 +21,0 @@ },

2

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

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

@@ -16,5 +16,9 @@ # chaingres

var chaingres = require("./chaingres");
var postgres = require("pg");
var queryConn = "postgres://"+name+":"+password+"@"+host+":"+port+"/"+db+"";
client = new pg.Client(queryConn);
chaingres
.new()
.new(client)
.select(["c1", "c2"])

@@ -38,5 +42,6 @@ .from("table")

.offset(0)
.then(function(query) {
console.log(query);
.then(function(err,result) {
//This will return a bunch of rows
console.log(result);
})
```
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