Struct ydb_unofficial::sqlx::connection::YdbConnection
source · pub struct YdbConnection { /* private fields */ }Available on crate feature
sqlx only.Implementations§
source§impl YdbConnection
impl YdbConnection
sourcepub fn executor(
&mut self
) -> Result<YdbTransaction<'_, UpdatableToken>, YdbError>
pub fn executor( &mut self ) -> Result<YdbTransaction<'_, UpdatableToken>, YdbError>
Retrieve DML executor, that can select/insert/update values in existing tables, but cannot modify their definitions
sourcepub fn scheme_executor(
&mut self
) -> Result<TableClientWithSession<'_, UpdatableToken>, YdbError>
pub fn scheme_executor( &mut self ) -> Result<TableClientWithSession<'_, UpdatableToken>, YdbError>
Retrieve DDL executor, that makes operations on tables (create, delete, replace tables/indexes/etc). Note that DDL executor cannot fetch results, prepare and describe (never can used in sqlx macro). Parameter binding also unavailable
Trait Implementations§
source§impl Connection for YdbConnection
impl Connection for YdbConnection
type Database = Ydb
type Options = YdbConnectOptions
source§fn close(self) -> BoxFuture<'static, Result<(), Error>>
fn close(self) -> BoxFuture<'static, Result<(), Error>>
Explicitly close this database connection. Read more
source§fn ping(&mut self) -> BoxFuture<'_, Result<(), Error>>
fn ping(&mut self) -> BoxFuture<'_, Result<(), Error>>
Checks if a connection to the database is still valid.
source§fn begin(&mut self) -> BoxFuture<'_, Result<Transaction<'_, Ydb>, Error>>where
Self: Sized,
fn begin(&mut self) -> BoxFuture<'_, Result<Transaction<'_, Ydb>, Error>>where Self: Sized,
Begin a new transaction or establish a savepoint within the active transaction. Read more
source§fn shrink_buffers(&mut self)
fn shrink_buffers(&mut self)
Restore any buffers in the connection to their default capacity, if possible. Read more
source§fn transaction<'a, F, R, E>(
&'a mut self,
callback: F
) -> Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'a, Global>>where
F: for<'c> FnOnce(&'c mut Transaction<'_, Self::Database>) -> Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'c, Global>> + 'a + Send + Sync,
Self: Sized,
R: Send,
E: From<Error> + Send,
fn transaction<'a, F, R, E>( &'a mut self, callback: F ) -> Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'a, Global>>where F: for<'c> FnOnce(&'c mut Transaction<'_, Self::Database>) -> Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'c, Global>> + 'a + Send + Sync, Self: Sized, R: Send, E: From<Error> + Send,
Execute the function inside a transaction. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for YdbConnection
impl Send for YdbConnection
impl Sync for YdbConnection
impl Unpin for YdbConnection
impl !UnwindSafe for YdbConnection
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request