pub struct Deferred;Expand description
Mode::Deferred as a type, for the bound
Opens sets.
§Examples
use ruststream_sqlx_dialect::{
Dialect, Mode, Opening, Opens, Statement, StatementError, TableSpec, level,
};
/// libSQL, a fork of SQLite served over the network, a database without a built-in dialect.
#[derive(Debug)]
pub struct Libsql;
impl Dialect for Libsql {
fn name(&self) -> &'static str {
"libsql"
}
fn begin(&self, opening: Opening) -> Result<Option<&'static str>, StatementError> {
match opening {
Opening::Default => Ok(None),
Opening::Mode(Mode::Deferred) => Ok(Some("BEGIN DEFERRED")),
other => Err(StatementError::UnsupportedOpening {
dialect: self.name(),
opening: other.name(),
}),
}
}
}
// A table with `mode = deferred` mounts on `Libsql`.
impl Opens<level::Deferred> for Libsql {}Trait Implementations§
impl Copy for Deferred
impl Eq for Deferred
impl Opens<Deferred> for Sqlite
impl StructuralPartialEq for Deferred
Auto Trait Implementations§
impl Freeze for Deferred
impl RefUnwindSafe for Deferred
impl Send for Deferred
impl Sync for Deferred
impl Unpin for Deferred
impl UnsafeUnpin for Deferred
impl UnwindSafe for Deferred
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