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

@brainsights/postgres-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brainsights/postgres-wrapper - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

29

index.js
const pg = require("pg");
const SQL = require("sql-template-strings");
const squel = require("squel");
const debug = require("debug")("postgres-wrapper");

@@ -15,2 +16,18 @@ const uuid = require("@brainsights/brainlab-uuid");

pool.on("error", (error) => {
debug(`pg-pool error: ${error.message}`);
});
pool.on("connect", (client) => {
debug(`pg-pool: client connected: ${client.processID}`);
});
pool.on("acquire", (client) => {
debug(`pg-pool: client acquired`);
});
let end = async () => {
await pool.end();
};
class Client

@@ -57,3 +74,3 @@ {

debug(`${__.get(this).id} release client`);
__.get(this).client.end();
__.get(this).client.release();
}

@@ -109,8 +126,18 @@ __.get(this).revoke();

class Query
{
constructor()
{
return squel;
}
};
return {
end: end,
Client: Client,
Transaction: Transaction,
Range: require("./range"),
Query: Query,
}
};

3

package.json
{
"name": "@brainsights/postgres-wrapper",
"version": "1.0.2",
"version": "1.1.0",
"description": "",

@@ -17,4 +17,5 @@ "main": "index.js",

"sql-template-strings": "^2.2.2",
"squel": "^5.9.1",
"uuid": "^3.0.1"
}
}

@@ -62,2 +62,7 @@ const _ = require("lodash");

}
inspect()
{
return this.toString();
}
}

@@ -64,0 +69,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