AppsAutessaDB

Queries, APIs and SDKs · AutessaDB

Bulk and batch writes

AutessaDB writes many rows in one call: bulk insert, bulk update by ids and bulk delete by ids, or batch update and batch delete for every row matching a filter. Bulk calls are all-or-nothing by default and return a result per row.

A database essential, built in
bulk-insert · 2,000 rowsSAMPLE
{ "rows": [ ... ],
  "atomicity":    "BEST_EFFORT_PER_CHUNK",
  "triggerMode":  "SUPPRESS",
  "indexingMode": "DEFERRED",
  "computeMode":  "IMMEDIATE" }
per-row resultsSAMPLE
Chunks committed3 of 4Rows written1,500Row 1,612priority: not an allowed valueSemantic indexingdeferred

-- the problem

A loop of single writes is slow and leaves half-finished loads

Importing ten thousand rows one call at a time takes ages, and a failure halfway leaves the table in an unknown state. Bulk writes are one round trip and one unit of work, with clear per-row results.

What you get

  • bulk-insert, bulk-update-by-ids and bulk-delete-by-ids address rows by id.
  • batch-update and batch-delete address rows by whereGroups.
  • atomicity: ALL_OR_NOTHING (the default) writes the whole call as one transaction; BEST_EFFORT_PER_CHUNK commits good chunks and reports failed rows.
  • Bulk writes suppress triggers by default; set triggerMode to PER_ROW or BATCH_CONTEXT to opt in.
  • indexingMode and computeMode can be IMMEDIATE, DEFERRED or SKIP for semantic indexing and computed columns.
  • Required columns, select options and field-level security are checked on every row.

-- how it works

How does bulk and batch writes work in AutessaDB?

  1. Pick the shape

    By id (bulk) when you know the rows, by filter (batch) when a condition describes them.

  2. Pick the modes

    Decide atomicity, and whether triggers, indexing and computed columns should run now, later or not at all.

  3. Read the results

    Match per-row results to your input and retry anything that failed.

-- every option

Bulk mode fields

optionwhat it does
atomicityALL_OR_NOTHING (default) or BEST_EFFORT_PER_CHUNK.
triggerModeSUPPRESS (default), PER_ROW or BATCH_CONTEXT.
indexingModeIMMEDIATE (default), DEFERRED or SKIP (insert and update).
computeModeIMMEDIATE (default), DEFERRED or SKIP (insert and update).
Row capA generous per-call limit; split very large loads across calls.

-- permissions

Who can do what?

accesscan
WRITEInsert and update in bulk or batch.
WRITE (API keys need DELETE)Delete rows; API keys carry a separate DELETE permission per table.

-- relations

How it connects

-- faq

Questions about bulk and batch writes

Do bulk writes fire triggers?

Not by default. Bulk writes suppress triggers so an import does not fire thousands of actions; set triggerMode to PER_ROW or BATCH_CONTEXT to opt in. Single-row writes always fire triggers.

What happens if one row fails?

With ALL_OR_NOTHING, nothing is written. With BEST_EFFORT_PER_CHUNK, the failing chunk is reported per row and skipped while earlier chunks stay committed.

Can I update every row that matches a condition?

Yes, with batch-update, which takes the same whereGroups as a query.

$ autessa autessadb tables create

Try bulk and batch writes in AutessaDB

Bulk calls write many rows by id and batch calls change every row matching a filter, with control over atomicity, triggers, indexing and computed columns.

Read the AutessaDB guide or install the CLI.

100% customizable, code and all

Make AutessaDB fully your own.

Use it out of the box, then change anything. Ask Autobot, Autessa’s AI builder, for a new field, screen, report, workflow or agent and it builds it into your copy of the app. Or open the code and edit it yourself. Nothing is locked: the app, its data and its code are yours.

Start free and make it yours