site creation software

Transaction wrapper

More operations one transaction

If you want just to put many operations into one transaction, a wrapper would be the best solution to do this.

Just put whatever you want into the body:

        //Wrap all operation into single transaction
        db.wrapTransaction(transaction -> { 
                    //Insert entity 
                    var category = new Category() 

                    //Update entity
                            .update(transaction,                                     tabCategory.colLastUpdate()); 

                    //Delete entity
                    return null;

© Copyright 2020 Elephant Software Klaudiusz Wojtkowiak