better-sqlite3
Advanced tools
Comparing version 5.4.3 to 6.0.0
# API | ||
- [class `Database`](#class-database) | ||
- [class `Statement`](#class-statement) | ||
# class *Database* | ||
@@ -173,5 +176,5 @@ | ||
db.prepare('SELECT add2(?, ?)').get(12, 4); // => 16 | ||
db.prepare('SELECT add2(?, ?)').get('foo', 'bar'); // => "foobar" | ||
db.prepare('SELECT add2(?, ?, ?)').get(12, 4, 18); // => Error: wrong number of arguments | ||
db.prepare('SELECT add2(?, ?)').pluck().get(12, 4); // => 16 | ||
db.prepare('SELECT add2(?, ?)').pluck().get('foo', 'bar'); // => "foobar" | ||
db.prepare('SELECT add2(?, ?, ?)').pluck().get(12, 4, 18); // => Error: wrong number of arguments | ||
``` | ||
@@ -188,4 +191,4 @@ | ||
db.prepare("SELECT void()").get(); // => null | ||
db.prepare("SELECT void(?, ?)").get(55, 19); // => null | ||
db.prepare("SELECT void()").pluck().get(); // => null | ||
db.prepare("SELECT void(?, ?)").pluck().get(55, 19); // => null | ||
``` | ||
@@ -192,0 +195,0 @@ |
@@ -13,5 +13,7 @@ # Custom configuration | ||
By default, this distribution currently uses SQLite3 **version 3.29.0** with the following [compilation options](https://www.sqlite.org/compile.html): | ||
By default, this distribution currently uses SQLite3 **version 3.31.1** with the following [compilation options](https://www.sqlite.org/compile.html): | ||
``` | ||
SQLITE_DQS=0 | ||
SQLITE_LIKE_DOESNT_MATCH_BLOBS | ||
SQLITE_THREADSAFE=0 | ||
@@ -18,0 +20,0 @@ SQLITE_DEFAULT_MEMSTATUS=0 |
@@ -5,4 +5,5 @@ 'use strict'; | ||
const util = require('./util'); | ||
const CPPDatabase = require('../build/better_sqlite3.node').Database; | ||
const CPPDatabase = require('bindings')('better_sqlite3.node').Database; | ||
function Database(filenameGiven, options) { | ||
@@ -9,0 +10,0 @@ if (filenameGiven == null) filenameGiven = ''; |
{ | ||
"name": "better-sqlite3", | ||
"version": "5.4.3", | ||
"version": "6.0.0", | ||
"description": "The fastest and simplest library for SQLite3 in Node.js.", | ||
@@ -13,22 +13,27 @@ "homepage": "http://github.com/JoshuaWise/better-sqlite3", | ||
"dependencies": { | ||
"integer": "^2.1.0", | ||
"tar": "^4.4.10" | ||
"bindings": "^1.5.0", | ||
"integer": "^3.0.1", | ||
"prebuild-install": "^5.3.3", | ||
"tar": "4.4.10" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"cli-color": "^1.4.0", | ||
"cli-color": "^2.0.0", | ||
"fs-extra": "^8.1.0", | ||
"mocha": "^6.2.0", | ||
"mocha": "^7.0.1", | ||
"nodemark": "^0.3.0", | ||
"prebuild": "^10.0.0", | ||
"sqlite": "^3.0.3" | ||
}, | ||
"scripts": { | ||
"install": "prebuild-install || npm run build-release", | ||
"build-release": "node-gyp rebuild --release", | ||
"build-debug": "node-gyp rebuild --debug", | ||
"rebuild-release": "npm run lzz && npm run build-release", | ||
"rebuild-debug": "npm run lzz && npm run build-debug", | ||
"test": "mocha --exit --slow=75 --timeout=5000", | ||
"benchmark": "node benchmark", | ||
"download": "sh ./deps/download.sh", | ||
"lzz": "lzz -hx hpp -sx cpp -k BETTER_SQLITE3 -d -hl -sl -e ./src/better_sqlite3.lzz", | ||
"prepublishOnly": "npm run lzz", | ||
"install-debug": "node-gyp rebuild --debug", | ||
"rebuild": "npm run lzz && node-gyp rebuild", | ||
"rebuild-debug": "npm run lzz && node-gyp rebuild --debug", | ||
"test": "mocha --exit --slow=75 --timeout=5000", | ||
"benchmark": "node benchmark" | ||
"prepublishOnly": "npm run lzz" | ||
}, | ||
@@ -35,0 +40,0 @@ "license": "MIT", |
@@ -15,3 +15,2 @@ 'use strict'; | ||
next: () => (++dbId, global.util.current()), | ||
describeUnix: isWindows ? describe.skip : describe, | ||
itUnix: isWindows ? it.skip : it, | ||
@@ -18,0 +17,0 @@ }; |
'use strict'; | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const Database = require('../.'); | ||
util.describeUnix('Database#loadExtension()', function () { | ||
const filepath = require('path').join(__dirname, '../build/test_extension.node'); | ||
describe('Database#loadExtension()', function () { | ||
let filepath; | ||
before(function () { | ||
const releaseFilepath = path.join(__dirname, '..', 'build', 'Release', 'test_extension.node'); | ||
const debugFilepath = path.join(__dirname, '..', 'build', 'Debug', 'test_extension.node'); | ||
try { | ||
fs.accessSync(releaseFilepath); | ||
filepath = releaseFilepath; | ||
} catch (_) { | ||
fs.accessSync(debugFilepath); | ||
filepath = debugFilepath; | ||
} | ||
}); | ||
beforeEach(function () { | ||
@@ -7,0 +20,0 @@ this.db = new Database(util.next()); |
'use strict'; | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const Database = require('../.'); | ||
@@ -168,4 +170,16 @@ | ||
util.describeUnix('Database#loadExtension()', function () { | ||
const filepath = require('path').join(__dirname, '../build/test_extension.node'); | ||
describe('Database#loadExtension()', function () { | ||
let filepath; | ||
before(function () { | ||
const releaseFilepath = path.join(__dirname, '..', 'build', 'Release', 'test_extension.node'); | ||
const debugFilepath = path.join(__dirname, '..', 'build', 'Debug', 'test_extension.node'); | ||
try { | ||
fs.accessSync(releaseFilepath); | ||
filepath = releaseFilepath; | ||
} catch (_) { | ||
fs.accessSync(debugFilepath); | ||
filepath = debugFilepath; | ||
} | ||
}); | ||
specify('while iterating (blocked)', function () { | ||
@@ -172,0 +186,0 @@ whileIterating(this, blocked(() => this.db.loadExtension(filepath))); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2694746
3775
4
7
1
15
+ Addedbindings@^1.5.0
+ Addedprebuild-install@^5.3.3
+ Addedansi-regex@2.1.1(transitive)
+ Addedaproba@1.2.0(transitive)
+ Addedare-we-there-yet@1.1.7(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedconsole-control-strings@1.1.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddecompress-response@4.2.1(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddelegates@1.0.0(transitive)
+ Addeddetect-libc@1.0.3(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedexpand-template@2.0.3(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedgauge@2.7.4(transitive)
+ Addedgithub-from-package@0.0.0(transitive)
+ Addedhas-unicode@2.0.1(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addedinteger@3.0.1(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedmimic-response@2.1.0(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addednapi-build-utils@1.0.2(transitive)
+ Addednode-abi@2.30.1(transitive)
+ Addednoop-logger@0.1.1(transitive)
+ Addednpmlog@4.1.2(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedprebuild-install@5.3.6(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedreadable-stream@2.3.83.6.2(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@3.1.1(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedtar@4.4.10(transitive)
+ Addedtar-fs@2.1.1(transitive)
+ Addedtar-stream@2.2.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwhich-pm-runs@1.1.0(transitive)
+ Addedwide-align@1.1.5(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedinteger@2.1.0(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedtar@4.4.19(transitive)
Updatedinteger@^3.0.1
Updatedtar@4.4.10