Editing

Edit rows and documents, with a review before saving.

Docs

SQLite rows

Grid editing is available for SQLite tables with a primary key. Double-click a cell, or select a row and change its fields in the inspector.

  1. Make your changes.

    They stay in Query Anvil until you save. A marked deletion also stays pending.

  2. Review.

    Press ⌘S / Ctrl+S, or choose File → Review Changes…. The review shows each row’s before and after values, plus the SQL.

  3. Save.

    Choose Save changes in the review. Query Anvil applies the changes together in a transaction. Choose Keep editing to go back.

If a row has changed in the database since it was loaded, a conflict can prevent the save. Reload and inspect the current values before trying again.

Insert and delete

New row… opens an INSERT template in a query tab. Fill in its values, then run and review the statement.

For an editable SQLite row, Delete row marks it for deletion. Review and save to remove it from the database. Use Revert row to discard pending changes to that row.

Other databases

Use the SQL console for relational writes outside SQLite. Their results grid doesn’t use SQLite’s staged editing flow.

Firestore, Realtime Database, MongoDB and Elasticsearch/OpenSearch have document editing paths. Read the individual document before changing it, keep its version information, and review the write. A conflicting change is refused when the engine supports a matching version condition.

Editing a document isn’t the same as a partial update. A replacement can overwrite fields you leave out. Check the operation and complete value in the review.

Backups

For SQLite, choose File → Back Up SQLite Database… and pick a destination. Query Anvil uses SQLite’s backup API.

Other engines need their own backup tools. An exported result page is not a database backup.