MySQLTransaction implements ITransaction
Handles begin transaction, commit and rollback calls for a list of database connections.
Work is grouped by database connection id. Multiple database connections may be used.
Transactions are executed in the order they were received. Caveat: When multiple database connections are used, work is grouped by connection. Each encountered database connection will execute all related work in the order they were entered before moving on to the next database connection and then executing that connections work and so on.
Table of Contents
| $units | ||
|---|---|---|
| $executeOrder | ||
| __construct() | mixed | |
| beginTransaction() | Begins a transaction | void | 
| rollBack() | Rolls back an uncommitted transaction | void | 
| commit() | Commits a transaction after beginTransaction has been called | void | 
| run() | Executes the code that is part of the transaction | void | 
Properties
$units
        private
                mixed
        $units
         = []    
            
$executeOrder
        private
                mixed
        $executeOrder
         = []    
            
Methods
__construct()
        public
                                __construct(
                    
                            ...$units :
                ISQLRunnable
                            
                )
        : mixed
    
    
            Parameters
- $units : ISQLRunnable
Return values
mixedbeginTransaction()
Begins a transaction
        public
                                beginTransaction(
                )
        : void
    
    
    
        
    
rollBack()
Rolls back an uncommitted transaction
        public
                                rollBack(
                )
        : void
    
    
    
        
    
commit()
Commits a transaction after beginTransaction has been called
        public
                                commit(
                )
        : void
    
    
    
            Tags
run()
Executes the code that is part of the transaction
        public
                                run(
                )
        : void