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

any-db-transaction

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

any-db-transaction - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

2

package.json
{
"name": "any-db-transaction",
"version": "2.2.1",
"version": "2.2.2",
"description": "Transaction object for Any-DB adapters",

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

@@ -196,3 +196,3 @@ # any-db-transaction

Contains the adapter name used for the transaction, e.g. `'sqlite3'`, etc.
The [Adapter](https://github.com/grncdr/node-any-db-adapter-spec/#adapter) instance used by the resource (connection or parent transaction) underlying this transaction.

@@ -199,0 +199,0 @@ ### Transaction.query

@@ -19,21 +19,22 @@ var fs = require('fs')

var backend = url.split(':').shift()
if (backend == 'sqlite3') {
try {
fs.unlinkSync('/tmp/any_db_test.db');
} catch (err) {
console.error(err);
// ignore it
tape(backend + ' - ' + description, function (t) {
if (backend == 'sqlite3') {
try {
fs.unlinkSync('/tmp/any_db_test.db');
} catch (err) {
console.error(err);
// ignore it
}
}
}
var queryable, cleanup;
if (pool) {
queryable = anyDB.createPool(url, pool)
cleanup = queryable.close.bind(queryable)
} else {
queryable = anyDB.createConnection(url)
cleanup = queryable.end.bind(queryable)
}
var queryable, cleanup;
if (pool) {
queryable = anyDB.createPool(url, pool)
cleanup = queryable.close.bind(queryable)
} else {
queryable = anyDB.createConnection(url)
cleanup = queryable.end.bind(queryable)
}
tape(backend + ' - ' + description, function (t) {
callback(queryable, t)

@@ -40,0 +41,0 @@ t.on('end', cleanup)

@@ -310,2 +310,5 @@ var inherits = require('inherits')

var self = this
if (self.state() == 'closed') {
return
}
var err = self.state('closed')

@@ -327,3 +330,2 @@ if (err) {

})
self.emit('query', q)
return self

@@ -337,4 +339,4 @@ }

this.name = action + ' failed'
this.message = err.getMessage()
this.message = err.message
this.previous = null;
}
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