Questions tagged [node-sqlite3]

`node-sqlite3` is an asynchronous, non-blocking SQLite3 bindings module for Node.js.

More info:

278 questions
1
vote
0 answers

electron-packager and sqlite3 - Cannot find module when .exe is launched if packed in 32bit mode

I am trying to build a simple electron app that uses sqlite3. I want to create an .exe with the help of electron-packager. But if I then run the .exe I get an error saying that the sqlite3 module cannot be found. Runnig my app directly from gitBash…
Kloud
  • 101
  • 2
  • 7
1
vote
1 answer

SQLite3 Table Only Holds 1 Row

So, I have 2 tables, that I've added per the documentation, but something weird happens whenever I try to add a row to them. The data is written into the .db file, but whenever I query it, it only returns the first row. I can still update, and read…
R3FL3CT
  • 551
  • 3
  • 14
1
vote
0 answers

Node.js function not running in the correct order with async/await and SQLite3 command?

So I have a POST function that uses the database.each() method in it. I'm also sending an array (via response.send()) that is updated by the .each() method at the end of said function. The only problem is that the array is sending before the…
nickcoding2
  • 142
  • 1
  • 8
  • 34
1
vote
0 answers

How to insert data with On Conflict it will replace in sqlite

I have facing an issue while running sql query for bulk Insert and while inserting it was throwing an error that SQLITE_ERROR: near "ON": syntax error I am using sqlite3: 3.22.0 version and my DLL file was look like CREATE TABLE myTable ( id …
1
vote
0 answers

Jest testing a class that uses sqlite3; jest cannot find sqlite3/package.json?

I am trying to write unit tests of a class which utilizes sqlite3, using TypeScript. The class itself can correctly utilize sqlite3, but when I try to test the functions which use sqlite3, I get the following error message: Test suite failed to…
Catradora
  • 384
  • 1
  • 4
  • 12
1
vote
1 answer

Electron Application using Sqlite3 - FATAL ERROR: Error::Error napi_create_reference

I have followed the advice on this webpage https://bitfrit.com/how-to-use-sqlite-with-electron/ but I am still having issues when I reload my page to refresh the window. When I start the page for the first time, running npm start everything works.…
DaveK
  • 544
  • 1
  • 6
  • 16
1
vote
1 answer

How to do a multi word partial search in SQLITE?

Hello i want to write a multi word partial search in SQLITE for example if the user types 'red' i will give all antibodies with red in their names or in their colors or reactivity and if the user types 'red 20' i want to give the intersection of…
Mj Ebrahimzadeh
  • 587
  • 9
  • 22
1
vote
1 answer

Node Sqlite3 Errors

I'm using the sqlite3 package in node and beginning to flush out my REST API. I've decided to create a promise wrapper around the DB calls and in the controllers, use async/await to call those functions and set that return value to a variable. Then,…
mike varela
  • 467
  • 1
  • 6
  • 20
1
vote
1 answer

Electron app renderer process is crashing while loading new html page

I am new to Electron.js and Node.js. I am building a simple inventory desktop app using Electron.js using sqlite3 module. My app crashes while the BrowserWindow is loading a new html page. Ctrl+R reload solves it. Eg. In main.js (IPCMain), I do: …
jacobmathewin
  • 11
  • 1
  • 5
1
vote
1 answer

Read SQLite database with Node.js

Having this SQLite DB I'm trying to read the data from it. So, from table Athlete I want to read the first 3 columns. This is the code (app.js): var sqlite3 = require('sqlite3').verbose(); var db = new…
Leo Messi
  • 5,157
  • 14
  • 63
  • 125
1
vote
1 answer

Can't find a way to pin messages

I'm trying to create a bot discord, and I would like to make sure that the message sent "msg.channel.send(exampleEmbed)" will be pinned immediately when sent from the bot. I tried to look at the documentation but I can't find anything useful. Has…
Sho Deb
  • 33
  • 1
  • 3
1
vote
1 answer

Node SQLite3 - crashes when running insert on specific table

I have a SQLite database I am trying to add data to with the sqlite3 package. My query is as follows, and works in the SQLite command line. 'INSERT INTO…
02380b
  • 11
  • 1
1
vote
1 answer

sqlite3 update query refreshes electron renderer process

I realized that when i use update query with knex (with sqlite3) in electron js, after query done, the renderer process refreshes automatically! for example: index.html: ipc.send('UpdateTheRow', {'Id': 1, 'Title': 'foo', 'Date':…
Pooya Behravesh
  • 131
  • 2
  • 10
1
vote
0 answers

How to update a global variable with a sqlite query in javascript?

I want to update a globally declared variable after sqlite query, but I cant get it to work, I have read that it might be related to asynchronous functions but I have no idea how to implement callbacks and stuff in this example, can you guys help…
codex007
  • 21
  • 2
1
vote
0 answers

Unable to connect docker's named volume database from sqlite3 using nodejs

We are running two container one is from Python flask and the other one is ExpressJS, we have created a docker volume manually docker volume create --name localdb, this volume runs fine with python app where I have created docker-compose and defined…
151291
  • 3,308
  • 7
  • 48
  • 81