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

q-postgres

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

q-postgres - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.eslintrc

2

package.json
{
"name": "q-postgres",
"version": "1.0.1",
"version": "1.0.2",
"description": "Postgres with promises.",

@@ -5,0 +5,0 @@ "main": "q-postgres.js",

'use strict';
var q = require('q');
var PgConnection = require('./pg.connection');
var PostgresClient = require('pg').Client;
var Promise = require('q').Promise;
var Postgres = require('pg');
var PgWrapper = require('./pg.wrapper');

@@ -14,17 +14,14 @@ function PgPromise(user, pass, host, base) {

var connString = 'postgres://'.concat(user, ':', pass, '@', host, base);
var connString = 'pg://'.concat(user, ':', pass, '@', host, base);
pgPromise.connect = function() {
return q.Promise(function(resolve, reject) {
var postgresClient = new PostgresClient(connString);
return Promise(function(resolve, reject) {
Postgres.connect(connString, function(err, client, done) {
if (err) {
reject(err);
return done();
}
postgresClient.connect(function(err) {
if (err) return reject(err);
var pgConnection = new PgConnection(postgresClient);
pgConnection
.openTransaction()
.then(resolve)
.catch(reject);
var pgWrapper = new PgWrapper(client, done);
resolve(pgWrapper);
});

@@ -31,0 +28,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