Enum IsolationLevel
#[non_exhaustive]pub enum IsolationLevel {
ReadCommitted,
RepeatableRead,
Serializable,
}Expand description
The isolation level a batched request runs at.
Travels as the Neon-Batch-Isolation-Level header, not in the JSON body, and
applies only when SqlRequest::statements holds more than one statement —
a single statement is its own implicit transaction and the header is ignored.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ReadCommitted
Postgres’ default. A conditional insert can miss a conflict committed by a concurrent transaction after this one took its snapshot.
RepeatableRead
A stable snapshot for the whole batch.
Serializable
The only level at which a read-then-write append condition is safe
without an exclusion constraint, and the only one that can abort with
SQLSTATE 40001.
Implementations§
§impl IsolationLevel
impl IsolationLevel
pub const fn as_header_value(self) -> &'static str
pub const fn as_header_value(self) -> &'static str
The header value Neon expects.
Trait Implementations§
§impl Clone for IsolationLevel
impl Clone for IsolationLevel
impl Copy for IsolationLevel
§impl Debug for IsolationLevel
impl Debug for IsolationLevel
§impl Default for IsolationLevel
impl Default for IsolationLevel
impl Eq for IsolationLevel
§impl PartialEq for IsolationLevel
impl PartialEq for IsolationLevel
impl StructuralPartialEq for IsolationLevel
Auto Trait Implementations§
impl Freeze for IsolationLevel
impl RefUnwindSafe for IsolationLevel
impl Send for IsolationLevel
impl Sync for IsolationLevel
impl Unpin for IsolationLevel
impl UnsafeUnpin for IsolationLevel
impl UnwindSafe for IsolationLevel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more