Writing data
Create, update, and delete records with the Tadabase AI SDK.
Creating a record #
const res = await tada.records.create('tickets', {
field_10: 'Printer offline', // subject
field_11: 'high', // priority
field_12: '<customer-id>', // connection field
}); Updating a record #
Updates are partial — only the fields you send change. Anything you omit stays at its current value.
await tada.records.update('tickets', ticketId, {
field_13: 'resolved', // status
}); Deleting a record #
await tada.records.delete('tickets', ticketId); Nested writes and bulk edits #
Two heavier tools when a single record isn't enough:
- Subforms — pass connected child rows as a third argument to create() / update() to write a parent and its children in one transaction (an invoice plus its line items).
- Batch — records.batchUpdate() / records.batchDelete() change many records by an explicit id list or a filter. RLS narrows the target set server-side; selections over ~200 records queue for background processing.