New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

anydb-sql

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anydb-sql - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

36

anydb-sql.js

@@ -23,17 +23,24 @@ var anyDB = require('any-db');

if (dialect == 'sqlite') {
try {
var sqlitepool = require('./sqlite-pool');
var pool = sqlitepool(opt.url, opt.connections);
} catch (e) {
throw new Error("Unable to load sqlite pool: " + e.message);
var pool;
var self = {};
self.open = function() {
if (pool)
return; // already open
if (dialect == 'sqlite') {
try {
var sqlitepool = require('./sqlite-pool');
pool = sqlitepool(opt.url, opt.connections);
} catch (e) {
throw new Error("Unable to load sqlite pool: " + e.message);
}
}
else {
pool = anyDB.createPool(opt.url, opt.connections);
}
}
else {
var pool = anyDB.createPool(opt.url, opt.connections);
}
var self = {};
self.open();
function extendedTable(table) {

@@ -105,3 +112,8 @@ // inherit everything from a regular table.

self.close = pool.close.bind(pool);
self.close = function() {
if (pool)
pool.close.apply(pool, arguments);
pool = null;
};
self.begin = pool.begin.bind(pool);

@@ -108,0 +120,0 @@ self.query = pool.query.bind(pool);

{
"name": "anydb-sql",
"version": "0.1.8",
"version": "0.1.9",
"description": "anydb-sql combines node-anydb and node-sql",

@@ -5,0 +5,0 @@ "main": "anydb-sql.js",

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