I want to build an array of ids from a sqlite query using the node-sqlite3 library.
const sqlite3 = require('sqlite3')
const db = new sqlite3.Database('./db/database-name.db')
let ids = () => {
let sql = `select id from users;`
let result = []
…
I'm using the npm sqlite3 package in my web application for a mock-up restaurant. When my local server is started I'm creating a menuItems table:
var db = new sqlite3.Database(':memory:');
db.serialize(function() {
db.run('CREATE TABLE menuItems…
I'll try to explain this as briefly as possible but the question is long (I know). I have to show you the structure of the code so you can understand why I need to do what I am hopelessly trying to!
I'm working on an Electron/AngularJS project which…
I have an NodeJS application that run on a production server with forever.
That application use a third-party SQLite database which is updated every morning with a script triggered by a cron, who download the db from an external FTP to the server.
I…
I'm trying to use node-sqlite3 in an electron app, but in the app window, I'm getting the following error in the chrome console:
Uncaught TypeError: Cannot read property '_handle' of undefined
at file:///[...]/assets/js/bundle.js:38727:15
at…
I'm using Electron w/ webpack and try to add sqlite3 to the mix. See stripped down test project
I came accross two possible solutions.
When I require('sqlite3') in index.html and create a global variable referencing the database, I can query the db…
In the following function, I have attempted to run an statment.all query in sqlite3.
however the function ends without ever running the callback function.
I cannot pinpoint the problem even after a thorough debug and few experiments.
The strangest…
I've got a package that requires the node-sqlite3 package. However, it also requires that node-sqlite3 be built with sqlcipher support, or my package will fail to function correctly.
I am installing node-sqlite3 using:
export…
i have a sqlite3 nested query case. Was hoping to push each query result to a json array and return it back.
But always get "Error: SQLITE_MISUSE: Database handle is closed" for the 2nd select call.
Seems the db.close() gets called before the 2nd…
My node application is currently running in node version 8.3. I am getting above error of missing \node-v83-win32-x64\node_sqlite3.node' module in node_modules. When i try to install the same by running npm install --save sqlite3. I am getting below…
I'm trying to use the sqlite3 package to perform a full text search of an SQLite database. To do this, I have made the following function:
const searchDb = (query, column, callback) => {
const sql = `DROP TABLE IF EXISTS urls_fts;
CREATE…
I am having an issue executing an SQL statement immediately after creating and populating a table.
I think the record does not exist, because the creation query does not finish in time.
If I pass false for my clean flag (in createDatabaseFromSQL),…
My node application works on my local(MacOS), but it does not work if I use docker.
it works if I try local:
npm install
npm start
It throws error if I try docker
docker-compose build
docker-compose up
I'm getting this error.
Error: Cannot find…
In my React web app I want to read from local sqlite db file. From what I understand it can be done via sqlite3 service package. After installing npm install sqlite3 and executing the following code I'm getting an error (Windows machine). Does…
I'm trying to install sqlite3 in order to develop an express.js backend with sequelize. My operating system is Ubuntu 22.04. My Node version is 18.13.0, npm version 9.3.1.
My current situation is:
> npm install sqlite3 --save
npm WARN deprecated…