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

pg-promise

Package Overview
Dependencies
Maintainers
1
Versions
629
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-promise - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

index.js

@@ -178,3 +178,3 @@ // Cannot declare 'use strict' here, because queryResult

if (qrm) {
return dbInst.query(query);
return dbInst.query(query, qrm);
} else {

@@ -299,3 +299,3 @@ return dbInst.one(query);

if (qrm) {
return tx.query(query);
return tx.query(query, qrm);
} else {

@@ -302,0 +302,0 @@ return tx.one(query);

{
"name": "pg-promise",
"version": "0.2.0",
"version": "0.2.1",
"description": "PG + Promise made easy, with transactions support.",

@@ -21,3 +21,3 @@ "main": "index.js",

"transaction",
"postgresql"
"postgres"
],

@@ -24,0 +24,0 @@ "author": {

@@ -17,7 +17,7 @@ # Introduction

```javascript
var pgpLib = require('pg-promise'); // loading the library;
var pgpLib = require('pg-promise'); // loading the library
```
### 2. Initialize the library
```javascript
var pgp = pgpLib(/*options*/); // initializing the library, with optional global settings;
var pgp = pgpLib(/*options*/); // initializing the library, with optional global settings
```

@@ -48,3 +48,3 @@ You can pass additional ```options``` parameter when initilizing the library (see chapter Advanced for details).

```javascript
var db = new pgp(cn); // create a new database instance based on the connection details
var db = new pgp(cn); // create a new database instance from the connection details
```

@@ -72,3 +72,3 @@ There can be multiple database objects instantiated in the application from different connection details.

```javascript
db.query("select * from users", queryResult.none | queryResult.many);
db.query("select * from users", queryResult.many | queryResult.none);
```

@@ -92,3 +92,3 @@ which is equivalent to calling:

```javascript
db.many("select * from users")
db.manyOrNone("select * from users")
.then(function(data){

@@ -135,3 +135,3 @@ console.log(data); // printing the data returned

// returning a promise that determines a successful transaction:
return promise.all([q1, q2]); // all of the queries are to be resolved;
return promise.all([q1, q2]); // all of the queries are to be resolved

@@ -138,0 +138,0 @@ }).then(function(data){

Sorry, the diff of this file is not supported yet

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