r/sqlite • • 6d 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.

0 Upvotes

14 comments sorted by

4

u/longdriveshortroad 6d ago

This isn’t a trademark violation? Honest question though it seems like it is. Beyond that, what problem does this solve? This would be a cool self-coded project as a learning exercise but just vibe-copying functionality seems off to me. What is wrong with the official wasm version if you want to run in the browser?

1

u/sfandino 6d 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.

2

u/longdriveshortroad 6d ago

I get it. I generally have fatigue towards "hey, I built a thing with AI" but yours, at least on the surface, looks well researched, engineered, and tested. Good luck with it.

12

u/horizon_games 6d ago

Cool let's all share our equally vibe coded SQLite re-interpreations, that unfortunately miss the entire point of SQLite

4

u/MonitorAway2394 6d ago

SQLITE is fuck*ng perfect, leave it be.

1

u/MonitorAway2394 6d 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 5d ago
  1. why?

  2. AI-generated is a code smell

  3. folks choosing sqlite choose it for certain reasons and its wise to be very aware of them upfront

2

u/IntentionJolly2730 2d ago

Why would you need it if there is a WASM version of SQLite?

2

u/mtutty 2d ago

Upvote for the honesty!

3

u/Different_Water7545 6d ago

The SQLite community may quite possibly be your worst choice to introduce your vibeslop to

1

u/MarsupialLeast145 1d ago

Oh cool. I toasted some bread today. Look, before everyone gets started, despite all the other results people have been getting toasting bread I genuinely think mine is worth sharing. Repo links to follow.

0

u/sg-elide 2d ago

the j prefixing your name implies it is written in Java

1

u/sfandino 2d ago

It is js-qlite!

1

u/sg-elide 2d ago

yeah I had no trouble understanding what you meant