# Editing records

Aerospike Voyager lets you create, edit, and delete records directly in the data browser. Destructive operations (deletes, truncates) require confirmation by default so you can explore safely during development.

::: caution
Edits in Voyager write directly to your Aerospike cluster. There is no undo. Use caution when editing records on shared or production clusters.
:::

## Safety guardrails

Voyager shows a confirmation dialog before executing destructive operations such as deleting a record or truncating a set. This behavior is controlled by the **Confirm destructive edits** setting in **Settings**, which is enabled by default.

::: tip
Keep the confirmation dialogs enabled, especially on shared clusters. They provide a last chance to cancel before data is removed.
:::

## Adding a new record

Click the **\+ New record** button in the toolbar to open the **Add new record** dialog.

 ![Add new record dialog showing Namespace (pre-filled as test), Set (pre-filled as sample_users), Key field, Bins section with Bin name and Data type dropdown, and collapsed Policies (Advanced) section](https://aerospike.com/docs/_astro/add_new_record_dialog.CMJhvYD7_Z1ehEI4.png)

1.  At the top of the dialog, fill in:
    -   **Namespace**: Pre-filled with the current namespace when opened from a set or namespace view.
    -   **Set**: Pre-filled with the current set when opened from a set view, or type a set name.
    -   **Key**: Enter the user key for the record.
2.  In the **Bins** section, add one or more bins:
    -   Enter a **Bin name**.
    -   Select a **Data type** from the dropdown.
    -   Enter the **Value**. For list, map, and GeoJSON values, a JSON editor is available.
    -   Click **\+ Add bin** to add another bin.
3.  (Optional) Expand **Policies (Advanced)** to override defaults:
    -   **Send key** toggle: store the user key with the record so it can be retrieved on subsequent reads.
    -   **TTL (seconds)**: `0` = never expires. Use `-1` for namespace default, `-2` to keep existing TTL.
4.  (Optional) Expand **Code snippets (Experimental)** to view equivalent SDK code in Golang, Java, JavaScript, Python, and C++ (in that order). Copy a snippet to reproduce the same write programmatically.
5.  Click **Save** to write the record to the cluster.

## Editing an existing record

Existing records are edited inline using the tree-based bin editor on the record card. There is no separate “edit” dialog; click directly on the bin you want to change.

-   **Scalars** (string, integer, double, boolean) edit inline. Click the value, type the new value, and confirm.
-   **Complex types** (map, list, GeoJSON) open in a JSON code editor where you can modify the structure at any nesting depth.
-   The tree view lets you drill into nested maps and lists; each level is editable in place.

Voyager preserves the original data type by default. If you change a value to a different type (for example, a string to an integer), a confirmation dialog appears before the type conversion is applied.

## Supported data types

Voyager displays the following Aerospike data types: String, Integer, Double, Boolean, List, Map, Bytes, GeoJSON, and HLL.

When editing, **Bytes and HLL are read-only**. The remaining seven types can be written via the Add new record dialog and edited inline on existing records.

| Type | Description |
| --- | --- |
| String | UTF-8 text |
| Integer | 64-bit signed integer |
| Double | 64-bit IEEE 754 floating point |
| Boolean | True or false |
| List | Ordered collection (edited as JSON) |
| Map | Key-value collection (edited as JSON) |
| Bytes | Raw byte data (read-only) |
| GeoJSON | Geographic data in GeoJSON format (edited as JSON) |
| HLL | HyperLogLog (read-only) |

## Deleting a bin

To remove a single bin from a record, click the delete icon next to the bin. Voyager prompts for confirmation before removing the bin.

## Deleting a record

To delete an entire record:

1.  Click the delete button (trash icon) on the record card header.
2.  Confirm the deletion in the dialog.

If **[Durable Delete](https://aerospike.com/docs/database/learn/architecture/durable-deletes)** is enabled in Settings, Voyager writes a tombstone marker for the deleted record. This prevents the record from reappearing after a cold restart of the cluster. See [Write policies](#write-policies) for details.

## Truncating a set

To remove all records from a set:

1.  Right-click the set in the sidebar (or click its three-dot menu).
2.  Select **Truncate set**.
3.  Confirm the operation in the dialog.

::: caution
Truncating a set removes all of its records and cannot be undone. This operation affects every record in the set across the entire cluster.
:::

## Write policies

Voyager applies [write policies](https://aerospike.com/docs/database/learn/policies) configured in **Settings** to all write operations. These policies control how the Aerospike client behaves when writing or deleting records.

| Setting | Default | Description |
| --- | --- | --- |
| Send Key | On | Store the user key with records on write so it can be retrieved on subsequent reads. |
| Durable Delete | Off | Write a tombstone marker when deleting records. Prevents deleted records from reappearing after a cold restart. |
| Record Exists Action | Update | Controls what happens when writing to a key that already exists. |

### Record exists action options

| Option | Behavior |
| --- | --- |
| **update** | Create the record if it does not exist, or update bins on an existing record. Existing bins not included in the write are preserved. |
| **updateOnly** | Update an existing record only. Fail if the record does not exist. |
| **replace** | Create the record if it does not exist, or replace the entire record (all bins) if it does. |
| **replaceOnly** | Replace an existing record only. Fail if the record does not exist. |
| **createOnly** | Create the record only. Fail if the record already exists. |

## Next steps

-   [Browsing data](https://aerospike.com/docs/database/tools/voyager/guides/browsing-data)
-   [Filtering records](https://aerospike.com/docs/database/tools/voyager/guides/filtering-records)
-   [Expressions and SDK code](https://aerospike.com/docs/database/tools/voyager/guides/expressions-and-sdk-code)
-   [Loading sample data](https://aerospike.com/docs/database/tools/voyager/guides/sample-data)