pub struct Immediate;Expand description
Mode::Immediate 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::Immediate) => Ok(Some("BEGIN IMMEDIATE")),
other => Err(StatementError::UnsupportedOpening {
dialect: self.name(),
opening: other.name(),
}),
}
}
}
// A table with `mode = immediate` mounts on `Libsql`.
impl Opens<level::Immediate> for Libsql {}Trait Implementations§
impl Copy for Immediate
impl Eq for Immediate
impl Opens<Immediate> for Sqlite
impl StructuralPartialEq for Immediate
Auto Trait Implementations§
impl Freeze for Immediate
impl RefUnwindSafe for Immediate
impl Send for Immediate
impl Sync for Immediate
impl Unpin for Immediate
impl UnsafeUnpin for Immediate
impl UnwindSafe for Immediate
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