pub struct ReadUncommitted;Expand description
Isolation::ReadUncommitted as a type, for the bound
Opens sets.
§Examples
use ruststream_sqlx_dialect::{
Dialect, Isolation, Opening, Opens, Statement, StatementError, TableSpec, level,
};
/// SQL Server, a database without a built-in dialect.
#[derive(Debug)]
pub struct Mssql;
impl Dialect for Mssql {
fn name(&self) -> &'static str {
"mssql"
}
fn begin(&self, opening: Opening) -> Result<Option<&'static str>, StatementError> {
match opening {
Opening::Default => Ok(Some(
"SET TRANSACTION ISOLATION LEVEL READ COMMITTED; BEGIN TRANSACTION",
)),
Opening::Isolation(Isolation::ReadUncommitted) => Ok(Some(
"SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; BEGIN TRANSACTION",
)),
other => Err(StatementError::UnsupportedOpening {
dialect: self.name(),
opening: other.name(),
}),
}
}
}
// A table with `isolation = read_uncommitted` mounts on `Mssql`.
impl Opens<level::ReadUncommitted> for Mssql {}Trait Implementations§
Source§impl Clone for ReadUncommitted
impl Clone for ReadUncommitted
impl Copy for ReadUncommitted
Source§impl Debug for ReadUncommitted
impl Debug for ReadUncommitted
Source§impl Default for ReadUncommitted
impl Default for ReadUncommitted
impl Eq for ReadUncommitted
Source§impl Hash for ReadUncommitted
impl Hash for ReadUncommitted
impl Opens<ReadUncommitted> for MySql
Source§impl PartialEq for ReadUncommitted
impl PartialEq for ReadUncommitted
impl StructuralPartialEq for ReadUncommitted
Auto Trait Implementations§
impl Freeze for ReadUncommitted
impl RefUnwindSafe for ReadUncommitted
impl Send for ReadUncommitted
impl Sync for ReadUncommitted
impl Unpin for ReadUncommitted
impl UnsafeUnpin for ReadUncommitted
impl UnwindSafe for ReadUncommitted
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