Phalcon Model TransactionsA model transaction helps to maintain the integrity of the database after the operations such as insert/delete/update/rollback etc. Transaction checks whether the operations are successfully completed or not before committing the database. Transactions are of 3 types:
Manual TransactionsThis method is used when there is only one connection and easy transaction. This transaction can be created by just moving the current connection into transaction mode and then commit or rollback the operation whether it is successful or not. ImplementationOutput: Implicit TransactionsImplicit transaction ensures that the data is stored correctly. ImplementationIsolated TransactionsIsolated transactions are executed in a new connection ensuring that all the generated SQL, virtual foreign key checks and business rules are isolated from the main connection. ImplementationNext TopicPhalcon Cookies |