> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revoengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# api.upsertDatabaseData()

> Public low-code contract, signatures and examples for api.upsertDatabaseData.

## `api.upsertDatabaseData()`

Creates missing rows and PATCHes only properties present in each conflicting row.
This is the default: omit unrelated properties rather than reading a full row first.
A present null clears a nullable property; an omitted or undefined property is unchanged.
For a non-nullable property, null uses its declared database default; without a default it fails.
Pass \{ patch: false } only for the legacy full-replacement conflict behavior.
Pass \{ return: false } to skip returned rows, or \{ onlyKeys: true } for keys only.
skipUnchanged: true skips identical supplied fields; include or exclude selects compared columns.
filter checks current target values and restricts updates only; new rows are inserted independently.
With either conditional option enabled, success counts handled inputs, affected counts actual writes,
and data contains only written rows. Excluded-only changes do not update any column.

Notes:

* Low-code mutations execute atomically in one transaction within the remaining execution memory/time budget. An explicit caller transaction retains its configured timeout.
* REST/public SDK requests retain the 100,000-row limit per request.
* return defaults to true and includes full rows. return: false omits data; onlyKeys
  returns primary keys only. Returning full rows has a higher response-memory cost.
* Unavailable with `readOnly: true` (throws an error).

### Signature

```ts theme={null}
static upsertDatabaseData(
      name: string,
      data: LooseObject<any>[],
      options?: DatabaseUpsertOptions,
    ): Promise<DatabaseDataActionResponse>;
```

### Example

```ts theme={null}
await api.upsertDatabaseData('customers', [
  { customerId: 'c-1', status: 'ACTIVE' },
]);
```

See [all api methods](https://docs.revoengine.com/low-code/reference/api.md) or [runtime basics](https://docs.revoengine.com/low-code/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.