Pikbase Docs
Open console (opens the console)
Esc

Type to search.

Build

Transactions, triggers, and commit control

Coordinate atomic graph saves and backend automation with rollback, triggers, and explicit commit checkpoints.

Contract sourcePikbase docs

Pikbase carries transaction context across related Entity Service writes made during a backend function or synchronous workflow run. This lets a business operation update more than one entity while preserving one database consistency boundary.

Atomic multi-level saves

A save payload can contain nested one-to-one objects and one-to-many or many-to-many arrays at multiple levels. Entity Service identifies creates and updates from record IDs, maintains the relationships, and executes the graph write in one transaction. If validation or persistence fails anywhere in that graph, the database rolls back the complete save.

Attached workflow triggers

Entity definitions can carry workflow triggers for entity operations. A trigger selects its entity definition and operation, can run before or after that operation, and can be ordered, run in parallel, create a workflow instance, or apply to each element of a bulk request. Triggers are optional: ordinary entity operations do not require a workflow.

Transactional functions and workflows

The tenant runtime assigns a transaction ID and propagates it into Entity Service calls made by the function or workflow. Pending database edits therefore participate in the runtime transaction instead of becoming unrelated writes. When execution reports an error before a commit checkpoint, the pending database edits are rolled back.

Manual commit checkpoints

Declarative functions and workflow activities can include a Commit changes operation. It flushes every pending entity change in the current transaction, allowing a long operation to establish an intentional checkpoint before continuing. Work committed before that checkpoint is durable and is not undone by a later failure.

Side-effect boundary

Database rollback cannot retract an email already sent, a payment already submitted, or another external API side effect. Keep irreversible calls after required database validation, use explicit commit points deliberately, and design external integrations for idempotency and compensation.