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

109 questions
0
votes
1 answer

Can I use single parameter in better-sqlite.get() or better-sqlite.all() multiple times in the same statement

I'm using better-sqlite in node to access an sqlite3 database. Is there a way to pass a single parameter to all() or get() and use it multiple times in the statement. At the moment I'm doing this: const statement = `SELECT * FROM table WHERE …
beingmrkenny
  • 192
  • 1
  • 10
0
votes
0 answers

Getting an error message trying to install better sqlite3 on rpi4

I was trying to install better-sqlite3 again when I found out the package was missing when i ran npm update, here is the error message (RPI4b 4gb, Running Raspbian) . Also I a, using a couple other packages that require this as a dependancy. I am…
0
votes
1 answer

Attach table2 under table 1 Sqlit

I have two tables(comparison & ajusted_cases). Both tables have equal number of columns(same column names as well) I just want the (adjusted_cases) table to be placed under (comparison) table. Like the second table is merged under the first…
Hard work
  • 45
  • 3
0
votes
2 answers

Can't install better-sqlite3 in order to run Discord bot

I'm using a raspberry pi 4 as well as Visual Studio Code to setup and run my bot. All of my packages were installed, except for better-sqlite3. I tried re-installing node-gyp (successfully installed) and then re-installing better-sqlite3 again, here…
0
votes
0 answers

Cannot read property 'tag' of undefined

I recently made a Discord bot for my Discord Server which basically counts up a number when typing in a specific message into a chat. For this I also made a leaderboard to see who has the highest score. Until recently the bot worked fine but now it…
D3ltafl3x
  • 11
  • 3
0
votes
0 answers

I tried finding answers to this question but I didn't find any. I have an issue installing quick.db on Visual Studio Code v1.50.1

I'm creating a Discord Bot with discord.js v12 and I wanted to use quick.db for a DataBase but It keeps saying there was a problem installing better-sqlite3@7.1.1 script. I tried doing npm i better-sqlite3@7.1.1 and npm i better-sqlite3 but it keeps…
0
votes
0 answers

unable to connect sqlite3 in python for long urls

I want to read a sqlite database in python.If i put the database in same working folder it opens.But if put long urls it dont work. File name is History and location is C:\Users\HP\AppData\Local\Google\Chrome\User…
0
votes
0 answers

Node Error, module compiled against different Node.js version, but my installed version matches the requirement

Getting an error saying that the module I'm trying to load was compiled with NODE_MODULE_VERSION 83, not N_M_V 72 which is what it needs, but I have 72 installed (pls see pic for full text of error). I know the bot is functional bc I was hosting it…
cassieoh
  • 1
  • 2
0
votes
1 answer

How to Create a Currency and Inventory System in Discord.js

So I've been trying to make a currency system and an inventory system for my Discord bot for the past few days. However, I can't seem to make any progress at all. I've tried using sequelize and better-sqlite3 (which is what I'm currently using), all…
Keanny Ooi
  • 3
  • 1
  • 3
0
votes
1 answer

npm rebuild, electron-rebuild doesn't use special parameters

I have an electron/React app running. So after I install all packages I have to execute electron-rebuild so there are no version issues. I install one package in the preinstall script: npm install better-sqlite3 --build-from-source --sqlite3=my…
Laurent Dhont
  • 1,012
  • 1
  • 9
  • 22
0
votes
1 answer

Why is better-sqlite3 not writing my data when existent data already exists?

Whenever I set sqlite data for data that already exists, it won't set it. So if user '9' doesn't exist, it creates the row in the sqlite table with no problem. If data does exist, it does nothing. E.g. trying to write to user '9' BEFORE {user: '9',…
SomePerson
  • 1,171
  • 4
  • 16
  • 45
0
votes
0 answers

How can I make a new column in a table in sqlite?

my question is asking how I can create a column in a table that is pre made. I am using better-sqlite3 and am hoping to understand how to alter tables with better-sqlite3. My current code that I have tried is sql.prepare("ALTER TABLE user ADD COLUMN…
king
  • 127
  • 1
  • 7
0
votes
1 answer

What does sql prepare get return?

When I do something like sql.prepare("SELECT * FROM raid WHERE raid1 > 0 AND NOT id='685337576810610734'").run(), does it return an array? How do I do this if I want to access each user independently who has raid1 > 0? Im not sure about the sql…
king
  • 127
  • 1
  • 7
0
votes
0 answers

sqlite_exec for insert query is successful, but entry not found in sqlite table

I'm facing a strange issue where in my insert query using sqlite_exec API says successful return value, but when I check in sqlite table I dont see that entry, Below is my code Insert query : INSERT INTO table_name VALUES…
BeingKS
  • 71
  • 6
0
votes
0 answers

getJson function printing out an empty list when it takes in an user input

I am creating a program where the user selects a city from a drop down menu in data.py* and it prints out data for that city. After the user selects the city, it goes into a getJson function in backend.py* that takes the user's selected city as an…
drewster
  • 83
  • 1
  • 8