Comments (3)
Can you please post the test files? Without these, it's pretty hard to determine why this error occurs. My guess is that one of the statements in your code isn't finalized. When you create statements with Database#prepare()
, you have to call .finalize()
on them; otherwise, sqlite will keep them around infinitely and won't allow closing the database.
from node-sqlite3.
Yes, of course, sorry. It was just the example at the top of README.md but with :memory: changed to an on disk file so I could check the results against my /usr/bin/sqlite3 v3.7.5.
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('./test.sqlite');
db.serialize(function() {
db.run("CREATE TABLE lorem (info TEXT)");
var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
for (var i = 0; i < 10; i++) {
stmt.run("Ipsum " + i);
}
db.each("SELECT rowid AS id, info FROM lorem", function(err, row) {
console.log(row.id + ": " + row.info);
});
});
db.close();
from node-sqlite3.
Thank you, I fixed the error in the readme
from node-sqlite3.
Related Issues (20)
- Not safe for use concurrently from multiple async scopes HOT 4
- @npmcli/move-file is deprecated, use @npmcli/fs instead HOT 2
- finalize is necessary
- Bug creating foreign key
- when i run test my extension get error in init use sqlite
- Running Sequelize on Bun using sqlite3 produces undefined symbol: uv_close error HOT 1
- How to obtain the fragmented size of a sqlite database
- v5.1.7 changes the usage of a binary mirror (incompatibly)
- Too many non-runtime dependencies after installation
- Add character offset to error message
- How install sqlite3 package manually after electron-packager on linux for windows
- electron v30.0.1 install error HOT 1
- Getting "Could not locate the bindings file" when trying to open DB in Angular 17 SSR project (ExpressJs) HOT 1
- Couldn't be built successfully
- IOT instruction node testing.js
- Install on Vercel: warning "[email protected]" has no binaries
- node-sqlite3 package not supported for Cross platform
- sqlite3 installs but fails on require/import in mingw64 HOT 2
- sqlite fts feature
- pnpm i sqlite3 WITH AttributeError: 'NoneType' object has no attribute 'groupdict' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-sqlite3.