# Protected writes

> A database write takes more than one tap. Changes stay pending until you review the exact SQL and confirm on your device, then Pulse runs them in a transaction.

- Section: Pro tools
- Availability: With Pro and Team. On iPhone, iPad, Mac and Android.
- URL: https://pulse-app.si/en/docs/pro/writes

## Edit a row

The connection has to be set to **Read & Write**. Nothing is written until you’ve reviewed and confirmed.

### iPhone and iPad

1. Tap a cell or a row, change the value, then tap **Apply Change**. **Insert Row**, **Duplicate Row** and **Delete Row** follow the same path.
2. Keep going if you need to. The bar shows **2 pending changes**, with **Cancel** and **Verify**.
3. Tap **Verify**: the **2 changes to apply** sheet shows the exact SQL and what happens if something fails.
4. Tap **Confirm with Face ID**.
5. Pulse shows **2 changes applied** and the write time. **Back to Table** returns you to the rows.

![The review sheet on a production connection: one change, the exact SQL between BEGIN and COMMIT, and the Confirm with Face ID button.](https://pulse-app.si/media/en/ecrans/pro-apercu-sql.webp)

The review sheet on a production connection: the exact SQL, what happens if something fails, then Face ID.

### Mac

1. Edit cells, add or delete rows. The bar reminds you that there’s **nothing written yet**.
2. Click **Review and Apply** (⌘S): the **Apply 2 Changes?** sheet shows the exact SQL and what happens if something fails.
3. Confirm with Touch ID or your login password.
4. Pulse shows **2 changes applied** and the write time.

### Android

1. Tap a cell or a row, change the value, then apply the change.
2. Keep going if you need to. The bar shows how many changes are pending, with **Cancel** and **Verify**.
3. Tap **Verify**: the sheet shows the exact SQL and what happens if something fails.
4. Tap **Confirm with fingerprint**, or enter the device code.
5. Pulse shows the changes applied and the write time.

Diagram: A database write always waits for your review and your confirmation.

## What you’re asked for

| Device | Confirmation |
| --- | --- |
| iPhone and iPad | Face ID or Touch ID, or the device passcode |
| Mac | Touch ID, or your login password |
| Android | Your fingerprint, or the device code |

This confirmation is required for every write, even with the app lock turned off. It can’t be disabled. On Mac, **Settings › Security** shows **Confirm Every Database Write** set to **Always**.

A Free session stays read-only, even if the connection is set to **Read & Write**: **Editing a database is part of Pulse Pro.** Redis stays read-only on every plan.

## If a query fails

The confirmation sheet tells you what will apply before you confirm.

| Write | Message | In practice |
| --- | --- | --- |
| From the table (PostgreSQL, MySQL, MariaDB, SQLite) | **If a query fails, nothing is applied.** | One transaction, rolled back on any failure |
| MongoDB with a replica set | **If a query fails, nothing is applied.** | One transaction |
| MongoDB without a replica set | **Server doesn’t support transactions: if a change fails, the ones already applied stay written.** | One change after another |
| SQL editor | **No transaction added by Pulse: if a query fails, the ones already run stay written.** | Your queries, exactly as you wrote them |

## From the SQL editor

Pulse classifies each query before running it. Only reads go through without a prompt (`SELECT`, `SHOW`, `EXPLAIN`, `DESCRIBE`, `VALUES`, `TABLE`, `PRAGMA` without an assignment). Everything else counts as a write, including `EXPLAIN ANALYZE` on a query that writes and a `WITH` containing an `UPDATE`.

The editor then says **This query writes data: you’ll confirm it with Face ID before it runs.** On a read-only connection, Pulse answers **Read-only connection.** and sends nothing.

## On a production connection

A connection whose **Environment** is **Prod** reminds you: **Production: writes and sensitive commands are always confirmed with Face ID.** The sheet is titled **2 changes in production**. On Android, your fingerprint is also required before opening a production terminal.

## Coding agents

On Mac, a write requested by an agent goes through the same sheet and Touch ID, one statement at a time. MongoDB and Redis writes aren’t open to agents.

> **One exception: free mode**
>
> Turned on with Touch ID, agent by agent, in **Settings › Coding Agents**, **Free mode** stops asking that agent for anything for the time you choose (1 hour, 1 day, 7 days or no limit). Every action still goes in the log. See [Tools and permissions](https://pulse-app.si/en/docs/mcp/tools).

- [Database client](https://pulse-app.si/en/docs/pro/database)
- [Keys and passwords](https://pulse-app.si/en/docs/security/secrets)
- [Tools and permissions](https://pulse-app.si/en/docs/mcp/tools)
