pub struct Connection { /* private fields */ }Expand description
A route-scoped application driver. Backend handles remain private.
Implementations§
Source§impl Connection
impl Connection
pub fn open(route: DatastoreRoute) -> Result<Self, DactylError>
pub fn open_with_options( route: DatastoreRoute, options: OpenOptions, ) -> Result<Self, DactylError>
pub fn from_env() -> Result<Self, DactylError>
pub fn datastore(&self) -> Datastore
pub fn route(&self) -> &DatastoreRoute
Sourcepub fn read(&self, sql: &str, params: &[Parameter]) -> Result<Rows, DactylError>
pub fn read(&self, sql: &str, params: &[Parameter]) -> Result<Rows, DactylError>
Read application rows from the selected backend.
Sourcepub fn write_result(
&self,
sql: &str,
params: &[Parameter],
) -> Result<WriteResult, DactylError>
pub fn write_result( &self, sql: &str, params: &[Parameter], ) -> Result<WriteResult, DactylError>
Write application data and return the explicit physical result.
Sourcepub fn write(&self, sql: &str, params: &[Parameter]) -> Result<u64, DactylError>
pub fn write(&self, sql: &str, params: &[Parameter]) -> Result<u64, DactylError>
Write application data and return the affected count for compatibility.
pub fn atomic( &self, operations: &[Operation], ) -> Result<AtomicResult, DactylError>
pub fn access_mode(&self) -> AccessMode
Auto Trait Implementations§
impl !RefUnwindSafe for Connection
impl !Send for Connection
impl !Sync for Connection
impl !UnwindSafe for Connection
impl Freeze for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
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