Enum sqlite3_ext::TransactionType
source · pub enum TransactionType {
Deferred,
Immediate,
Exclusive,
}Expand description
The type of transaction to create.
Variants§
Deferred
The transaction does not actually start until the database is first accessed. If the first statement in the transaction is a SELECT, then a read transaction is started. Subsequent write statements will upgrade the transaction to a write transaction if possible, or return SQLITE_BUSY. If the first statement in the transaction is a write statement, then a write transaction is started.
Immediate
The database connection starts a new write immediately, without waiting for a write statement. The transaction method might fail with SQLITE_BUSY if another write transaction is already active on another database connection.
Exclusive
Exclusive is similar to Immediate in that a write transaction is started immediately. Exclusive and Immediate are the same in WAL mode, but in other journaling modes, Exclusive prevents other database connections from reading the database while the transaction is underway.