HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
WiseLibs
better-sqlite3
JavaScript2018–2025
WiseLibs / better-sqlite3

better-sqlite3

The fastest and simplest library for SQLite3 in Node.js.

18Distinct people
19Mentions
0Explicit recommenders
7.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The fastest and simplest library for SQLite3 in Node.js.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year19 dated mentions

Observed mentions: 2018-03-19 05:43:10 UTC to 2025-10-20 22:35:38 UTC.

02462018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC211
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC505
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC624
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC523

What Hacker News says

19 sources
I’ve enjoyed https://github.com/WiseLibs/better-sqlite3/blob/master/docs/... as a code of conduct. Simple, well-motivated, well-practiced (I think). Unlike more convoluted CoCs, it’s tightly scoped on work, not fun. Specific labor intended to produce contributions instead of enjoyable social experiences. I feel a lot more OSS should avoid fun. Fun doesn’t seem to scale, especially when it gets in the way of real work.
In Eric S. Raymond to the OSS community on codes of conduct: Refuse to have one
One huge benefit of using SQLite over a traditional server/client DBMS is the ability to easily add SQL functions that call into your host language and memory-space. For example, we’re using better-sqlite3 which has a convenient API for adding SQL functions [1], and we have dozens of helper methods for dealing with time using the temporal-polyfill module. We have custom JSON-based serialisation formats for PlainDate, PlainTime, PlainDateTime, ZonedDateTome, etc. Then in SQL we can call ‘isDate_Between__(a, b, c)`. a, b, and c are deserialised by the JS (TS) function, the logic is run, and the result is returned to SQLite. We’ve had no performance issues with this approach, though we’re only dealing with simple CRUD stuff. No big data. You can even use these functions with generated columns and indexes, but I haven’t found a proper use for
Read the rest
In SQLite Date and Time Functions (2007)
These may be useful reading: https://github.com/TryGhost/node-sqlite3/issues/408#issue-57... https://github.com/WiseLibs/better-sqlite3/issues/32#issueco... Copying a quote from the second: > The sqlite3 C API serializes all operations (even reads) within a single process. You can parallelize reads to the database but only by having multiple processes, in which case one process being blocked doesn't affect the other processes anyways. In other words, because sqlite3 serializes everything, doing things asynchronously won't speed up database access within a process. It would only free up time for your app to do other things (like HTTP requests to other servers). Unfortunately, the overhead imposed on sqlite3 to serialize asynchronous operations is quite high, making it disadvantageous 95% of the time.
In Supercharge SQLite with Ruby Functions
If I were charged with this task I'd probably take an actual SQLite DB and write methods to parse data from text files, then process it within SQLite, and serialize it back to the text file when an API method is called or after each processing step. A fresh DB engine, fully re-implemented to match SQLite's API is insane unless you're a prodigy or have a sizable team and will come with numerous downsides. I can recommend https://github.com/WiseLibs/better-sqlite3 and https://github.com/loveencounterflow/dbay
In How practicle is it to have a textfile based database with an SQLite API?
Kent's recommended NodeJS module, `better-sqlite3`, has some very nifty features including the creation of JavaScript user-defined functions[0] that (if I understand this right) can be called from SQLite. Combined with TRIGGERs, I wonder if it might fire a function within the app when an UPDATE/INSERT happens from a different process? (This is me wondering out loud, I don't actually know.) I also recommend checking out Replicache[1] and alternatives, which may be a better way to handle the networking and database replication so that it doesn't rely on the underlying DB. [0] https://github.com/WiseLibs/better-sqlite3/blob/HEAD/docs/ap... [1] https://replicache.dev/
In I Migrated from a Postgres Cluster to Distributed SQLite with LiteFS
The frontend is in Vue. Both the FE and BE are in TypeScript. Parallelism is provided by https://github.com/photostructure/batch-cluster.js/ Metadata reads and writes are via https://github.com/photostructure/exiftool-vendored.js/ Persistence is via SQLite: https://github.com/WiseLibs/better-sqlite3 Image transforms are via Sharp: https://sharp.pixelplumbing.com/ My more nerdier blog posts are tagged here: https://photostructure.com/tags/coding/
In Lychee – Self-hosted photo-management done right

Showing the 15 most recent of 19 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.