Existing SQLite databases
Already have a SQLite file? Attach it, and each of its tables becomes a collection, with an API, rules, live updates and the admin UI, read and written where it is. Nothing is copied, and nothing is added to the file.
sluurp serve --attach shop=./northwind.dbThat’s all it takes to explore it: no app needed. Open the admin UI at /_/, where each table is a collection to browse, filter, edit and query with SQL. Add --public ./app when you also have a frontend to serve.
productsinshopbecomes the collectionshop_products; a columnProductNamebecomes the fieldproduct_name.- Writes go straight to your table, so other programs using the file see them at once.
- A new collection starts closed: only administrators see it until you give it rules.
- Attach several files by repeating
--attach. - A table without a text
idcolumn keeps its ids in Sluurp’s own file, beside each row’s rowid. A row written by another program shows its rowid as its id.
The file is attached to each connection under its name, and each table is seen through a temporary view with triggers that write through to it, made as a connection opens and gone when it closes. That is why nothing is added to your file.
History, search and the recycle bin apply to what is written through Sluurp; a change another program makes to the file directly is seen, but not recorded.