Skip to content

Editor

Use the editor to look at the records in a database and to change them. The editor below works on a demo database in memory, so you can try it safely.

  • Edit, add or delete a record in its card.
  • Filter takes the same where as query, such as { "done": false } or { "due": { "lt": "2026-12-10" } }.
  • Sort takes the name of a field.
  • Open file loads a database file of your own into memory. Your changes do not reach the file until you choose Download file.
  • Verify file checks the whole file for damage.
  • Merge a copy merges the records of another database file into the one that is open.

A browser lets only your own site open your app’s database file. To look at that database, add the editor to a page of your app:

import { open } from "starling-db";
import { mount } from "starling-db-editor";
import "starling-db-editor/editor.css";
// Use the same device name that your app uses.
const db = await open("app.db", "laptop");
mount(document.querySelector("#editor"), db, "app.db");