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)
- I couldn't build successfully in electron HOT 12
- npm_config_target_arch=arm64 install x64 on a x64 server HOT 1
- Unable to install sqlite3 HOT 9
- Reading field of type `JSON` returns invalid value
- How to package 32-bit sqlite on a Win10 64 bit system
- npm install sqlite3 fail if prebuilt unreachable and Python v3.12 is installed HOT 2
- sqlite3 crash on require with nw.js node.js app
- How to install sqlite for Linux and Windows in the same project?
- [ERROR] Unable to load sqlite3 module. See https://github.com/mapbox/node-sqlite3/wiki/Binaries
- SQLite 3 installation error message post-deployment
- Bundled build error on Windows HOT 4
- Being able to connect to a database that is located in a Buffer variable HOT 1
- Not safe for use concurrently from multiple async scopes HOT 4
- @npmcli/move-file is deprecated, use @npmcli/fs instead HOT 1
- 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)
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.