Questions tagged [node-sqlite3]

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

More info:

278 questions
3
votes
1 answer

How to tell Visual Studio Code compiled from source where to find sqlite module?

I am building the Visual Studio Code from the source checked out from the git repository: git clone https://github.com/microsoft/vscode I am building using: export NODE_OPTIONS=--max_old_space_size=2048 ./scripts/npm.sh install --arch=armhf…
nwaltham
  • 2,067
  • 1
  • 22
  • 40
3
votes
1 answer

SQLite3 + Node.js - Should I open and close the database for each INSERT or keep it always open?

I have a Node.js process monitoring an application, writing to the database when a certain action happens. There is a frontend for this database, which causes concurrency errors when both are trying to access the data. The internal processes dont…
pSuper
  • 33
  • 2
  • 6
3
votes
2 answers

Bind blob parameter in node-sqlite3

I have an SQLite3 table with BLOB primary key (id): CREATE TABLE item ( id BLOB PRIMARY KEY, title VARCHAR(100) ); In javascript models, the primary key (id) is represented as a Javascript string (one HEX byte per character): var item = { …
astreltsov
  • 1,943
  • 1
  • 16
  • 22
3
votes
1 answer

How to SELECT / get all rows with node-sqlite3?

I am trying to get all / more than one row of data out of sqlite3 database that I previously entered and ensured that it(data) is present. With db as the database object, my attempt looks like this: db.get ( 'SELECT * FROM my_table', …
Robert C. Holland
  • 1,651
  • 4
  • 24
  • 57
3
votes
0 answers

How Basic CRUD SQLite 3 With VueJs 2

i Have problem with SQlite3 and Vue2 I'm using Electron-Vue, and I have installed SQLite3 and Require it Successfully (database.db) using this: var sqlite3 = require('sqlite3').verbose(); var path = require('path') var db = new…
nbdized
  • 105
  • 2
  • 12
3
votes
3 answers

Copying data from one DB to another with node-sqlite - formatting the 'insert' statement

I'm writing a small utility to copy data from one sqlite database file to another. Both files have the same table structure - this is entirely about moving rows from one db to another. My code right now: let tables: Array = [ …
NiloCK
  • 571
  • 1
  • 11
  • 33
3
votes
1 answer

How to get last_insert_rowid from transaction?

I'm trying to perform an INSERT + UPDATE transaction in a database from my node.js application using node-sqlite3. However, I can't figure out how to get the last_insert_rowid when the transaction is done. My query looks something like this: BEGIN…
Michael
  • 9,060
  • 14
  • 61
  • 123
2
votes
0 answers

Async and await does not work in sqllite3 in nodejs

I try to Insert query into sqlite database. But the function Does not work correctly. const sqlite3 = require('sqlite3'); const { open } = require('sqlite'); async function main() { try { sqlite3.verbose(); const ordersDb =…
2
votes
0 answers

Building a NodeJS app with file based db using webpack, and Typescript

The problem I am using Phaser 3 html5 framework that runs on webpack. I am trying to make an offline game that would run on desktop or mobile apps, not a browser game, so I don't want to use the local storage or other in-memory databases. The…
CemreY
  • 367
  • 4
  • 13
2
votes
0 answers

Get column values as array from SQLite in Node.js

I want to make sure that the addresses array is being updated but this code prints an empty array. There is only one field in the addresses table, and I want all rows of that field to be in the addresses array. const sqlite =…
2
votes
0 answers

sqlite3 seems to be slow

im currently writing a electron App. I wanted to use a SQLite Datebase to store some data. I got a Code like this: var startTime = performance.now() let sql = `UPDATE entry SET title = "someData", …
Lammers
  • 21
  • 2
2
votes
0 answers

Error relocating /usr/src/api/node_modules/sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node: fcntl64: symbol not found?

I have a container running an API that works great. A few days ago I had some problems with my application so I decided to go back and rebuild my Docker container. But everything didn't go as planned... When I restarted with a new rebuilt version I…
Saibe
  • 21
  • 2
2
votes
1 answer

Getting yarn install gyp error with @vscode/sqlite3

Computer : MacBook Pro (16-inch, 2019) - Intel I7 OS : Monterey 12.3.1 Python Version : 3.8.0 Node Version : v14.17.6 Node-gyp : v7.1.2 I was able to run yarn install from this project before, but after an update I am having this issue. I have…
2
votes
1 answer

NodeJS SQLite3 prepared statement with IN and AND

I have this API setup in Express but I cannot figure out how to correctly prepare the language filter with the IN statement using SQLite3 in node.js. The first query applies the language filter correctly. I get the correct results but this could…
Yolkem
  • 23
  • 2
2
votes
0 answers

How to split column values before grouping them using sqlite and sequelize?

I'm fairly new to JavaScript and don't know how to perform the following action. I have a table named info in the database which is similar to below id city description 10 Paris some desc 2 New York some desc 4 Munich some…
1
2
3
18 19