Protocol
TransactionControlDatabase
Protocol for describing a database that allows fine-grained control over transcactions when you need more control than provided by
Database/transaction(_:)-1x3dsprotocol TransactionControlDatabase : Database
Overview
Warning
⚠️ It is the developer’s responsiblity to get hold of a Database, execute the transaction functions on that connection, and ensure that the functions aren’t called across different conenctions. You are also responsible for ensuring that you commit or rollback queries when you’re ready.
Do not mix these functions and Database/transaction(_:)-1x3ds.
Topics
Instance Methods
beginTransaction()Start the transaction on the current connection. This is equivalent to an SQLBEGINcommitTransaction()Commit the queries executed for the transaction and write them to the database This is equivalent to an SQLCOMMITrollbackTransaction()Rollback the current transaction’s queries. You may want to trigger this when handling an error when trying to create models. This is equivalent to an SQLROLLBACK
Relationships
Inherits From
DatabaseSwift.SendableSwift.SendableMetatype