Skip to main content

DomainTransactionOp

Defined in: js-api/src/domains.ts:1309

One operation of DomainsDataSource.transaction.

Properties​

PropertyTypeDescriptionDefined in
expected?objectOld-value guard for update ops on an external table (support.concurrency === 'expected'): the columns' values as last read, every one AND-ed to the key; a mismatch refuses the whole transaction with a DomainVersionConflictError carrying expected / current and the opIndex. Never together with expectedVersion; a literal leading $ is doubled as in values.js-api/src/domains.ts:1332
expectedVersion?numberOptimistic-concurrency guard for update ops on a platform-stored table (support.concurrency === 'version').js-api/src/domains.ts:1326
id?string-js-api/src/domains.ts:1323
onDuplicate?"error"Insert ops only: 'error' fails the whole transaction on a business-key conflict. Without it the insert merges into the existing row and reports {created: false, status: 'duplicate', existingId}.js-api/src/domains.ts:1336
op"insert" | "update" | "delete" | "restore"'restore' carries id alone and undoes a landed soft delete — the Delete grant, not a new permission; the server orders a parent's restore before its child's.js-api/src/domains.ts:1313
ref?stringNames this op's new row id; other ops may reference it in values as '$<ref>' — forward references are resolved (the server orders the inserts), and deletes run child-first. Escape a literal leading $ in a value by doubling it: '$$100' stores '$100'.js-api/src/domains.ts:1321
tablestring'<table>' in the transaction's schema, or '<schema>.<table>' — one transaction may span schemas.js-api/src/domains.ts:1316
values?object-js-api/src/domains.ts:1322