pub struct YdbConnection {
pub retry: bool,
/* private fields */
}
Available on crate feature
sqlx
only.Fields§
§retry: bool
Implementations§
Source§impl YdbConnection
impl YdbConnection
Sourcepub fn executor(&mut self) -> Result<YdbExecutor<'_>, YdbError>
pub fn executor(&mut self) -> Result<YdbExecutor<'_>, 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<YdbSchemeExecutor<'_>, YdbError>
pub fn scheme_executor(&mut self) -> Result<YdbSchemeExecutor<'_>, 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>>
fn transaction<'a, F, R, E>( &'a mut self, callback: F, ) -> Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'a>>
Execute the function inside a transaction. Read more
Source§impl Migrate for YdbConnection
Available on crate feature migrate
only.
impl Migrate for YdbConnection
Available on crate feature
migrate
only.fn ensure_migrations_table(&mut self) -> BoxFuture<'_, Result<(), MigrateError>>
fn dirty_version(&mut self) -> BoxFuture<'_, Result<Option<i64>, MigrateError>>
fn list_applied_migrations( &mut self, ) -> BoxFuture<'_, Result<Vec<AppliedMigration>, MigrateError>>
fn lock(&mut self) -> BoxFuture<'_, Result<(), MigrateError>>
fn unlock(&mut self) -> BoxFuture<'_, Result<(), MigrateError>>
fn apply<'e: 'm, 'm>( &'e mut self, migration: &'m Migration, ) -> BoxFuture<'m, Result<Duration, MigrateError>>
fn revert<'e: 'm, 'm>( &'e mut self, _migration: &'m Migration, ) -> BoxFuture<'m, Result<Duration, MigrateError>>
Auto Trait Implementations§
impl !Freeze for YdbConnection
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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