pub fn in_tx<T>( conn: &Connection, f: impl FnOnce(&Connection) -> Result<T, String>, ) -> Result<T, String>
Run f in one BEGIN IMMEDIATE transaction: committed if it returns Ok, rolled back otherwise.
f
BEGIN IMMEDIATE
Ok