Comparing version 2.1.12 to 2.1.13
{ | ||
"name": "sqlite3", | ||
"description": "Asynchronous, non-blocking SQLite3 bindings", | ||
"version": "2.1.12", | ||
"version": "2.1.13", | ||
"homepage": "http://github.com/developmentseed/node-sqlite3", | ||
@@ -25,3 +25,4 @@ "author": { | ||
"Nathan Rajlich <nathan@tootallnate.net>", | ||
"AJ ONeal <coolaj86@gmail.com>" | ||
"AJ ONeal <coolaj86@gmail.com>", | ||
"Mithgol" | ||
], | ||
@@ -33,3 +34,2 @@ "repository": { | ||
"devDependencies": { | ||
"step": "0.0.4", | ||
"mocha": "1.12.x" | ||
@@ -41,4 +41,3 @@ }, | ||
"scripts": { | ||
"pretest":"make db", | ||
"test": "mocha -R spec --timeout 10000" | ||
"test": "mocha -R spec --timeout 200000" | ||
}, | ||
@@ -45,0 +44,0 @@ "licenses": [{ "type": "BSD" }], |
@@ -110,2 +110,3 @@ # NAME | ||
* [Johannes Schauer](https://github.com/pyneo) | ||
* [Mithgol](https://github.com/Mithgol) | ||
@@ -112,0 +113,0 @@ |
@@ -0,3 +1,11 @@ | ||
#!/usr/bin/env node | ||
var existsSync = require('fs').existsSync || require('path').existsSync; | ||
var path = require('path'); | ||
var sqlite3 = require('../../lib/sqlite3'); | ||
var count = 1000000; | ||
var db_path = path.join(__dirname,'big.db'); | ||
function randomString() { | ||
@@ -12,16 +20,18 @@ var str = ''; | ||
var db = new sqlite3.Database('test/support/big.db'); | ||
var count = 1000000; | ||
db.serialize(function() { | ||
db.run("CREATE TABLE foo (id INT, txt TEXT)"); | ||
db.run("BEGIN TRANSACTION"); | ||
var stmt = db.prepare("INSERT INTO foo VALUES(?, ?)"); | ||
for (var i = 0; i < count; i++) { | ||
stmt.run(i, randomString()); | ||
} | ||
stmt.finalize(); | ||
db.run("COMMIT TRANSACTION"); | ||
}); | ||
if (existsSync(db_path)) { | ||
console.log('okay: database already created (' + db_path + ')'); | ||
} else { | ||
console.log("Creating test database... This may take several minutes."); | ||
var db = new sqlite3.Database(db_path); | ||
db.serialize(function() { | ||
db.run("CREATE TABLE foo (id INT, txt TEXT)"); | ||
db.run("BEGIN TRANSACTION"); | ||
var stmt = db.prepare("INSERT INTO foo VALUES(?, ?)"); | ||
for (var i = 0; i < count; i++) { | ||
stmt.run(i, randomString()); | ||
} | ||
stmt.finalize(); | ||
db.run("COMMIT TRANSACTION"); | ||
}); | ||
} |
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
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
1
1778
126
2787710
9