Skip to content
v2.7

Rows

Create, read, update, list and delete the rows of a table.

Each row is an object with the table’s columns, plus the system fields ($id, $createdAt, $updatedAt, $permissions). The same methods exist in @owbase/web (with the user’s session) and in @owbase/node (with the API key).

linhas.ts
import { ID, Query, TablesDB } from '@owbase/web';
import { client } from './client';
const db = new TablesDB(client);
const table = { databaseId: 'store', tableId: 'orders' };
const created = await db.createRow({ ...table, rowId: ID.unique(), data: { customer: 'Ana', total: 120 } });
const fetched = await db.getRow({ ...table, rowId: created.$id });
await db.updateRow({ ...table, rowId: fetched.$id, data: { status: 'paid' } });
const { rows } = await db.listRows({ ...table, queries: [Query.equal('status', 'paid'), Query.limit(10)] });
console.log(rows.map((r) => r.$id));
await db.deleteRow({ ...table, rowId: created.$id });
  • updateRow changes only what you send in data; the rest of the row stays as it is.
  • Dates go in and out as ISO 8601 text in UTC (2026-10-20T13:00:00.000+00:00). Use new Date(...).toISOString() to write them.
  • A required column must be included in createRow. A column that is missing, extra, or has the wrong type returns row_invalid_structure (400), with the column in the message.
  • Lists accept queries and come back in pages.
  • To react to changes without polling, subscribe to the table’s events through Realtime.
Was this page helpful?