Skip to content

Clientside transactions #3

@SevDan

Description

@SevDan

There is good way to implement user transactions

Example API:

userdata pg_begin_tx(userdata connection)
Execute query CREATE TRANSACTION, set it status 'open' and save into local transactions storage.

userdata pg_rollback_tx(userdata transaction)
Get transaction from storage. If transaction is open and valid, rollback it with ROLLBACK and set 'rollbacked' status.
Abort transaction when has no instances in storage

userdata pg_commit_tx(userdata transaction)
Get transaction from storage and commit it with COMMIT if opened and set 'commited' status.
Abort transaction when has no instances in storage

Client database transactions control implementation may prevent problems with concurrent execution and add more performance features (for instance, execute whole transaction in one query)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions