Skip to content

v0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 05:14
0b93a81
  • Added: StatementTimeout::transaction($context, $callback) opens a
    transaction, runs the callback under the budget and commits (rolls back and
    rethrows on error). On PostgreSQL the limit is a SET LOCAL that ends with
    the transaction, so a rollback — even after a timeout aborted it — leaves
    nothing on the session (#6).
  • Changed (breaking): on PostgreSQL, within() (and run()) entered outside
    a transaction throws LogicException when the callback returns with a
    transaction open, instead of silently restoring inside it — a later rollback
    undid that restore and the session kept the budget timeout. A callback that
    throws keeps its own error. MySQL and MariaDB are unaffected: their session
    variables are not transactional (#6).