Skip to main content

HS.Util.Scoped.Transaction

class HS.Util.Scoped.Transaction extends %Library.RegisteredObject

This object provides a scope-safe wrapper around a transaction. A transaction is started when the Start() classmethod is invoked which returns a 'Tranaction' instance. The tranaction can be Committed by calling the Commit() method or aborted by calling the Rollback method. If the transaction is unresolved when the object goes out of scope, it will be rolled back.

Method Inventory

Methods

method Commit()
Commits the transaction level begun when 'Start' was invoked.
This method will throw a GeneralError if either Commit or Rollback was called previously.
method Rollback()
Rolls-back the transaction level begun when 'Start' was invoked
This method will throw a GeneralError if either Commit or Rollback was called previously.
classmethod Start() as HS.Util.Scoped.Transaction
This method starts a transaction and returns the scoped object.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab