Struct sea_orm::ProxyDatabaseConnection
source · pub struct ProxyDatabaseConnection { /* private fields */ }
Expand description
Defines a connection for the [ProxyDatabase]
Implementations§
source§impl ProxyDatabaseConnection
impl ProxyDatabaseConnection
sourcepub fn new(
db_backend: DbBackend,
funcs: Arc<Mutex<Box<dyn ProxyDatabaseTrait>>>
) -> Self
pub fn new( db_backend: DbBackend, funcs: Arc<Mutex<Box<dyn ProxyDatabaseTrait>>> ) -> Self
Create a connection to the [ProxyDatabase]
sourcepub fn get_database_backend(&self) -> DbBackend
pub fn get_database_backend(&self) -> DbBackend
Get the DatabaseBackend being used by the [ProxyDatabase]
sourcepub fn execute(&self, statement: Statement) -> Result<ExecResult, DbErr>
pub fn execute(&self, statement: Statement) -> Result<ExecResult, DbErr>
Execute the SQL statement in the [ProxyDatabase]
sourcepub fn query_one(
&self,
statement: Statement
) -> Result<Option<QueryResult>, DbErr>
pub fn query_one( &self, statement: Statement ) -> Result<Option<QueryResult>, DbErr>
Return one QueryResult if the query was successful
sourcepub fn query_all(&self, statement: Statement) -> Result<Vec<QueryResult>, DbErr>
pub fn query_all(&self, statement: Statement) -> Result<Vec<QueryResult>, DbErr>
Return all QueryResults if the query was successful
sourcepub fn fetch(
&self,
statement: &Statement
) -> Pin<Box<dyn Stream<Item = Result<QueryResult, DbErr>> + Send>>
pub fn fetch( &self, statement: &Statement ) -> Pin<Box<dyn Stream<Item = Result<QueryResult, DbErr>> + Send>>
Return QueryResults from a multi-query operation
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ProxyDatabaseConnection
impl Send for ProxyDatabaseConnection
impl Sync for ProxyDatabaseConnection
impl Unpin for ProxyDatabaseConnection
impl UnwindSafe for ProxyDatabaseConnection
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