Questions tagged [better-sqlite3]

Better-SQLite3 is a Node.js API for SQLite3, claiming ease-of-use, improved efficiency and faster processing.

Better-SQLite3 is an API for use with Node.js, It differs from other popular SQLite3 API's in that it is synchronous rather than asynchronous.

  • It claims speed improvements of between 3 and 28 times over other similar API's.
  • Support for 64bit Integers.
  • Simplicty and efficiency.
  • Custom SQL
  • Full transaction Support.

The SQLite compilation options include:-

  • Foreign Key enabled by default.
  • Larger cache size.
  • R-Tree extension added for improved Range queries.
  • Latest Full Text Search Engine (FTS5)

For more Information see better-sqlite3

80 questions
6
votes
1 answer

How can i use TypeORM with better-sqlite3

How can i use TypeORM with better-sqlite3? on the official documentation, there is a section form better-sqlite3. I already installed by typeorm@latest and typeorm@next but there is no options for better-sqlite3 yet. If i try to force initialize it,…
Daniel Santos
  • 8,957
  • 15
  • 65
  • 139
5
votes
1 answer

How do I turn a node app into a VS Code extension?

I have built a node app that uses a module to work with a database (better-sqlite3). It works fine as a node app. but, Now I am trying to make a VS Code extension that has most of the same functionality. However, when I install the module, build,…
5
votes
1 answer

Updating a value in SQL (better-sqlite3) with Node.JS

I currently have a database of people with each individual person and they hold a status value. I am trying to change their status value. const id = parseInt(req.params.id , 10); const { valid, messageObj } = validateId(id); if (!valid) { …
Danjuro
  • 101
  • 1
  • 8
4
votes
2 answers

Error: Could not locate the bindings file better-sqlite3.node

The Problem There are some problem with maybe my installation of better-sqlite3 because when I try to execute my index.js (click to show it on pastebin) with node index.js there is always the same result. I tried on MacOS, it works but in my…
mandaputtra
  • 588
  • 8
  • 20
4
votes
0 answers

Unable to test better-sqlite3 within a project based on electron-vue boilerplate

I used electron-vue to generate the base for my project. I can get my application to launch, however when I attempt to run yarn test, I get the following error: Child html-webpack-plugin for "index.html": Asset …
djsumdog
  • 1,979
  • 1
  • 20
  • 45
3
votes
0 answers

How to integrate sqlite3 in Sveltekit?

I have been using sqlite3 for most of my fullstack applications (node/express, django/drf + svelte on the front end as the consumer of the api endpoints) and have been trying to figure out how to integrate sqlite3. Here is what I did I am assuming…
2
votes
1 answer

Count amount of arrays in a database

I have a database and I will lay out an example. guildid botid 1234 ["2345","3456","3714","1812"] 9876 ["8765","5432"] 4346 NULL 2371 ["3179"] 1254 NULL 1257 ["1721","7104","8265"] 8321 NULL I need to…
Ragnar Lothbrok
  • 166
  • 1
  • 1
  • 17
2
votes
1 answer

need a way around the "node running out of memory" error

I am parsing ~250K XMLs and loading the data into a SQLite database. I am using node version 10.15.1 with cheerio and better-sqlite3 on a Mac OS X laptop with 8GB memory. I am readdirSync-ing the entire folder of ~250K files, and parsing the XML…
punkish
  • 9,855
  • 20
  • 61
  • 86
2
votes
0 answers

Get the sibling value of a SQLITE value

I have a SQLite Table: +---------+-----------+-----------+-----------+ | userID | balance | ledger | lasttopup | +---------+-----------+-----------+-----------+ | 1 | 90 | 780 | 12/10/18 | | 2 | 180 | 0…
1
vote
1 answer

sqlite3 + node: when to close db?

I'm using better-sqlite3 on Node, but I suspect my questions are applicable to node-sqlite3 as well. I basically have 2 simple questions, relating to a server-rendered website: Do I need to explicitly call .close() on the database? I seem to…
Zoltán Matók
  • 3,829
  • 2
  • 28
  • 55
1
vote
0 answers

How to build better-sqlite3 for Electron on Raspberry Pi 3?

I try to run better-sqlite3 in my Electron app on a Rasperry Pi. I get an error from TypeORM at runtime: { constructor: 'Error', name: 'UnhandledRejection DriverPackageNotInstalledError', stack: 'UnhandledRejection…
didil
  • 593
  • 4
  • 19
1
vote
1 answer

Is there a way to get more than 1 value using?

I have a better-sqlite3 statement that orders and ranks my database, and I have a IN statement so I can select more than 1 row. That is where I run into an issue, I need to fetch multiple rows based on a dynamic array of IDs. My SQLITE Statement…
SomePerson
  • 730
  • 3
  • 11
  • 37
1
vote
0 answers

Discord.js adding rank feature to XP system using better-sqlite3

Im currently trying to add a rank feature to my already existing xp system. I can return a list from the database, in order of XP no problem, the issue is mapping and indexing. I know it should be simple but im struggling. any help would be greatly…
Evolsurt
  • 31
  • 8
1
vote
1 answer

SQLite error "No such column" when I can see that the column exists

The backstory here is that I'm working on a Discord bot. One of the requested functions is having it lob insults. I thought it would be fun to give users the ability to add insults via a SQLite 3 database (specifically, better-sqlite3), and in doing…
1
vote
2 answers

Difference between sqlite and better-sqlite3 implementation

What's the difference between sqlite and better-sqlite3 implementations? I have to use better-sqlite3 to create a database for a form (+ only node.js and express), but the only clear example I found uses sqlite. Is there any difference? If not,…
1
2 3 4 5 6