Zum Inhalt springen
#0296
Sqlite

Load fifty thousand rows with one POST

The survey export is a 50,000-row CSV on your laptop. You want it queryable by the team in the next ten minutes.

You don't provision a database. You POST to /api/v1/sqlite/db?db=survey.db&create_db_if_missing=true. The transaction body has two items: a CREATE TABLE IF NOT EXISTS with noFail: true, and an INSERT with valuesBatch carrying the rows as arrays. One HTTP call, one ACID transaction, a database that didn't exist a second ago.

Your colleague queries it from her notebook with a second POST. Another teammate opens the SQLite web UI in a tab. The file sits under /hoody/databases/, where the host's FUSE mount serializes writes, so when two of you append results at the same time nothing locks.

No connection string to share, no driver to install, no RDS to wait twelve minutes for.

The loader is a request. The database is an address.