Add a comment to InProgress.

This commit is contained in:
Richard Newman 2017-12-07 12:19:59 -08:00
parent a3b8fd3022
commit b7fb44a5a6

View file

@ -205,6 +205,11 @@ impl Conn {
inputs)
}
/// Take a SQLite transaction.
/// IMMEDIATE means 'start the transaction now, but don't exclude readers'. It prevents other
/// connections from taking immediate or exclusive transactions. This is appropriate for our
/// writes and `InProgress`: it means we are ready to write whenever we want to, and nobody else
/// can start a transaction that's not `DEFERRED`, but we don't need exclusivity yet.
pub fn begin_transaction<'m, 'conn>(&'m mut self, sqlite: &'conn mut rusqlite::Connection) -> Result<InProgress<'m, 'conn>> {
let tx = sqlite.transaction_with_behavior(TransactionBehavior::Immediate)?;
let (current_generation, current_partition_map, current_schema) =