#[non_exhaustive]pub enum Registration {
Transactional,
Autocommit,
}Expand description
How the entry point runs the registration closure.
#[non_exhaustive]: a match outside quack-rs needs a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transactional
Run the closure inside BEGIN TRANSACTION on the registration
connection, COMMIT when it returns Ok, and ROLLBACK when it
returns Err or panics. A failed LOAD then leaves no catalog entry
behind (scalar, aggregate and table functions, macros, types, copy
functions, tables) and can be retried; casts, replacement scans and
configuration options are not catalog entries and stay registered. The
default.
Autocommit
Let every registration and statement commit on its own, as quack-rs did
before 0.20: what the closure registered before a failure stays
registered, and retrying the LOAD in the same database fails at the
first name it registers again. Use it when the closure must keep going
after a failed statement, or must control transactions on the
registration connection itself.
Trait Implementations§
Source§impl Clone for Registration
impl Clone for Registration
Source§fn clone(&self) -> Registration
fn clone(&self) -> Registration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more