r/sqlite • u/sfandino • 26d ago
jSQLite
Hi everyone! I’ve been working on jSQLite, an AI-generated TypeScript translation of SQLite’s read-only C internals, and it’s reached a point where I’d like to share it.
It runs directly in the browser without WebAssembly, native code or a query server. You can open an immutable SQLite database over HTTP and execute queries locally.
It supports a broad range of common SQL constructs, including joins, aggregates, subqueries, CTEs, window functions and JSON functions, along with UTF-8 and both UTF-16 database encodings. Recent work includes STAT4-informed index selection for supported skip-scan paths.
This is a preliminary release, and I’d particularly welcome examples of queries that produce unexpected results. Development uses SQLite 3.53.4 as a pinned reference, with differential tests comparing typed results, column metadata, errors and statement reset behavior.
The translation has been generated using Saivage, an autonomous software-development system I’m also building. jSQLite is one of my projects for testing that system against a substantial engineering problem.
Browser playground: https://salva.github.io/jsqlite/
Source and releases: https://github.com/salva/jsqlite
Saivage: https://salva.github.io/saivage-v3/
4
u/MonitorAway2394 26d ago
SQLITE is fuck*ng perfect, leave it be.
1
u/MonitorAway2394 26d ago
also sounds cool and fun I'm 100% kidding lololololol I mean, SQLITE is perfect, but, yeah, no this sounds like a fun thing to do though, just had to try to be funny without this disclaimer in the first message LMFAO, I suck so hard at communicating shit LOLOLOLOLOL
2
u/GrogRedLub4242 26d ago
why?
AI-generated is a code smell
folks choosing sqlite choose it for certain reasons and its wise to be very aware of them upfront
2
3
u/Different_Water7545 26d ago
The SQLite community may quite possibly be your worst choice to introduce your vibeslop to
0
u/sg-elide 22d ago
the j prefixing your name implies it is written in Java
1
0
26d ago
[deleted]
1
u/sfandino 26d ago
Well, you're right... I didn't put much thought into the name and never considered the possibility of a trademark violation!
This is not a self-coded project, but in a way, I see it as a self-coded project for Saivage, which is actually my main project these days. So I'm not trying to learn how to implement a database. I'm trying to learn how to get an AI-based development platform to complete a non-trivial project like this.
I decided to translate SQLite because I had been experimenting with some VFS extensions, but working in C wasn't very productive, and the API provided by SQLite wasn't flexible enough for what I wanted to do. So I thought, well, why not translate the whole thing to TS/JS and work from there?
Anyway, I'm just announcing it here because I thought others might find it useful. There's a substantial amount of work behind it. Most of the SQL engine has already been reimplemented and is working.
13
u/horizon_games 26d ago
Cool let's all share our equally vibe coded SQLite re-interpreations, that unfortunately miss the entire point of SQLite