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
0 answers

Can't do this (with a for loop) in node-sqlite3

I need to have the same results with node-sqlite3 because I want to use it in a rest api and it needs to be asynchronous. How can I do this? When I tried it in node-sqlite3 in a for loop the results where always random. I couldn't understand why.…
0
votes
1 answer

Query better-sqlite3 for record data

So I have a table called logging in my database, with a schema of guildid & channel I need to get the contents of channel if the guildid matches, I ran console.log(logs) to see what was actually happening and it said { channel: '495602952778678274'…
Ragnar Lothbrok
  • 306
  • 1
  • 4
  • 22
0
votes
1 answer

Reading contents of DB for channel.id

My logging command needs a channel to send messages, I do this with a >logging #channel-here command, it stores on better-sqlite3, my issue is I am not sure on how to read the contents and convert it to a channel. I have been working on this for…
Ragnar Lothbrok
  • 306
  • 1
  • 4
  • 22
0
votes
1 answer

Do I need to check the format of binding arguments of a better-sqlite3 command

Take a look at this code which uses better-sqlite3: router.post('/auth', (req, res) => { var rc = req.params('code') var code_entry = db.prepare('SELECT * FROM pending_registrations WHERE code = ?').get(rc) if (code_entry === undefined)…
saga
  • 1,933
  • 2
  • 17
  • 44
0
votes
0 answers

Javascript Array only using last value of iteration

I'm writing a function that pulls data out of a SQLite database, parses the information into a Javascript array and formats it into the format that the application I'm working on is expecting and pushes the new formatted data into an array to be…
0
votes
0 answers

Can't install better-sqlite on ubuntu as root

I want to install better-SQLite on my ubuntu server but I get the notification that I do not have enough permission to install it in that folder, how can I fix this? (See photo for exact error) https://i.stack.imgur.com/0fPA0.png
0
votes
1 answer

Problems with installing SQLite3 and Node-Gyp

I have been working on getting a new databases and I have been stuck on the same error. I tried Ito reinstall Python, node.js, etc. But none of these worked This is my error. 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program…
0
votes
1 answer

Electron: Perform sqlite (better-sqlite) db operations in another thread

I'm developing a desktop application using Electron framework and I've to use sqlite database for app data. I decided to use better-sqlite3 because of: Custom SQL function support (It's very important for me) It's much faster than node-sqlite3 in…
Ali.M
  • 311
  • 6
  • 24
0
votes
2 answers

Error installing npm package on Azure app service

Was able to successfully build better-sqlite3 and integer@1.0.1 with npm install on Linux and Windows 7 without a problem. However have issue on Azure. Have following error: > npm install integer -dd �[37;40mnpm info it worked if it ends with…
Aleksey Kontsevich
  • 4,671
  • 4
  • 46
  • 101
-1
votes
0 answers

Better-sqlite error when i start yarn on link step

I have problem with yarn command yarn ➤ YN0000: ┌ Resolution step ➤ YN0000: └ Completed in 0s 265ms ➤ YN0000: ┌ Fetch step ➤ YN0000: └ Completed in 0s 366ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and…
-1
votes
1 answer

Cannot install better-sqlite3 package on MacOS Ventura

I am trying to install the Node.js package better-sqlite3 on my Strapi App, on my new laptop, a MacBook Pro M2 running on MacOS Ventura 13.2.1. It is not successful because, from what I understood, there are packages missing, and specifically while…
MH info
  • 52
  • 8
-1
votes
1 answer

python upload image and save it at database sqlite3

#I want to allow the user to upload a picture and save it in the database(sqlite3), I tried the following, but it doesn't work: def filedialogs(self): global get_img get_img =…
-1
votes
1 answer

How to create column for every single integer within a range in SQLite?

Here's some sample data from my table: day_number daily_users_count 1 1 3 1 6 1 7 1 9 2 10 2 I need all day_number values, from 1 to max(day_number), and I want daily_users_count to be…
nein yards
  • 27
  • 5
-1
votes
3 answers

Use time function with the date 2019-04-01 to add 2 hours to the time using sqlite3

I am trying to writing sql in sqlite3 but somehow it is not passing the result . I tried this : select datetime ('2019-04-01 12:20',time('+2 hours')); or select time ('2019-04-01 12:20','+2 hours'); or select date ('2019-04-01','YYYY-MM-DD…
ngage49
  • 19
  • 1
  • 4
-1
votes
2 answers

splitting a reward across different users based on linked variable

Say I have user 1, user 2, and user 3. user 1 has 10x user 2 has 50x and user 3 has 40x. There is a reward and the reward is 1y. How is it possible to split that reward accordingly to the variables tied to each user? The user data is stored in a…