#[non_exhaustive]pub struct Transaction { /* private fields */ }
Implementations§
Source§impl Transaction
impl Transaction
Source§impl Transaction
impl Transaction
Sourcepub fn new(local: bool, tx: Transactor) -> Transaction
pub fn new(local: bool, tx: Transactor) -> Transaction
Create a new query store
Sourcepub fn inner(self) -> Transactor
pub fn inner(self) -> Transactor
Retrieve the underlying transaction
Sourcepub fn enclose(self) -> Arc<Transaction>
pub fn enclose(self) -> Arc<Transaction>
Enclose this transaction in an Arc
Sourcepub async fn lock(&self) -> MutexGuard<'_, Transactor>
pub async fn lock(&self) -> MutexGuard<'_, Transactor>
Retrieve the underlying transaction
Sourcepub async fn closed(&self) -> bool
pub async fn closed(&self) -> bool
Check if the transaction is finished.
If the transaction has been canceled or committed,
then this function will return true
, and any further
calls to functions on this transaction will result
in a Error::TxFinished
error.
Sourcepub async fn cancel(&self) -> Result<(), Error>
pub async fn cancel(&self) -> Result<(), Error>
Cancel a transaction.
This reverses all changes made within the transaction.
Sourcepub async fn commit(&self) -> Result<(), Error>
pub async fn commit(&self) -> Result<(), Error>
Commit a transaction.
This attempts to commit all changes made within the transaction.
Sourcepub async fn exists<K>(
&self,
key: K,
version: Option<u64>,
) -> Result<bool, Error>
pub async fn exists<K>( &self, key: K, version: Option<u64>, ) -> Result<bool, Error>
Check if a key exists in the datastore.
Sourcepub async fn get<K>(
&self,
key: K,
version: Option<u64>,
) -> Result<Option<Val>, Error>
pub async fn get<K>( &self, key: K, version: Option<u64>, ) -> Result<Option<Val>, Error>
Fetch a key from the datastore.
Sourcepub async fn getm<K>(&self, keys: Vec<K>) -> Result<Vec<Option<Val>>, Error>
pub async fn getm<K>(&self, keys: Vec<K>) -> Result<Vec<Option<Val>>, Error>
Retrieve a batch set of keys from the datastore.
Sourcepub async fn getp<K>(&self, key: K) -> Result<Vec<(Key, Val)>, Error>
pub async fn getp<K>(&self, key: K) -> Result<Vec<(Key, Val)>, Error>
Retrieve a specific prefix of keys from the datastore.
This function fetches key-value pairs from the underlying datastore in grouped batches.
Sourcepub async fn getr<K>(
&self,
rng: Range<K>,
version: Option<u64>,
) -> Result<Vec<(Key, Val)>, Error>
pub async fn getr<K>( &self, rng: Range<K>, version: Option<u64>, ) -> Result<Vec<(Key, Val)>, Error>
Retrieve a specific range of keys from the datastore.
This function fetches key-value pairs from the underlying datastore in grouped batches.
Sourcepub async fn delc<K, V>(&self, key: K, chk: Option<V>) -> Result<(), Error>
pub async fn delc<K, V>(&self, key: K, chk: Option<V>) -> Result<(), Error>
Delete a key from the datastore if the current value matches a condition.
Sourcepub async fn delr<K>(&self, rng: Range<K>) -> Result<(), Error>
pub async fn delr<K>(&self, rng: Range<K>) -> Result<(), Error>
Delete a range of keys from the datastore.
This function deletes entries from the underlying datastore in grouped batches.
Sourcepub async fn delp<K>(&self, key: K) -> Result<(), Error>
pub async fn delp<K>(&self, key: K) -> Result<(), Error>
Delete a prefix of keys from the datastore.
This function deletes entries from the underlying datastore in grouped batches.
Sourcepub async fn clr<K>(&self, key: K) -> Result<(), Error>
pub async fn clr<K>(&self, key: K) -> Result<(), Error>
Delete all versions of a key from the datastore.
Sourcepub async fn clrc<K, V>(&self, key: K, chk: Option<V>) -> Result<(), Error>
pub async fn clrc<K, V>(&self, key: K, chk: Option<V>) -> Result<(), Error>
Delete all versions of a key from the datastore if the current value matches a condition.
Sourcepub async fn clrr<K>(&self, rng: Range<K>) -> Result<(), Error>
pub async fn clrr<K>(&self, rng: Range<K>) -> Result<(), Error>
Delete all versions of a range of keys from the datastore.
This function deletes entries from the underlying datastore in grouped batches.
Sourcepub async fn clrp<K>(&self, key: K) -> Result<(), Error>
pub async fn clrp<K>(&self, key: K) -> Result<(), Error>
Delete all versions of a prefix of keys from the datastore.
This function deletes entries from the underlying datastore in grouped batches.
Sourcepub async fn set<K, V>(
&self,
key: K,
val: V,
version: Option<u64>,
) -> Result<(), Error>
pub async fn set<K, V>( &self, key: K, val: V, version: Option<u64>, ) -> Result<(), Error>
Insert or update a key in the datastore.
Sourcepub async fn replace<K, V>(&self, key: K, val: V) -> Result<(), Error>
pub async fn replace<K, V>(&self, key: K, val: V) -> Result<(), Error>
Insert or replace a key in the datastore.
Sourcepub async fn put<K, V>(
&self,
key: K,
val: V,
version: Option<u64>,
) -> Result<(), Error>
pub async fn put<K, V>( &self, key: K, val: V, version: Option<u64>, ) -> Result<(), Error>
Insert a key if it doesn’t exist in the datastore.
Sourcepub async fn putc<K, V>(
&self,
key: K,
val: V,
chk: Option<V>,
) -> Result<(), Error>
pub async fn putc<K, V>( &self, key: K, val: V, chk: Option<V>, ) -> Result<(), Error>
Update a key in the datastore if the current value matches a condition.
Sourcepub async fn keys<K>(
&self,
rng: Range<K>,
limit: u32,
version: Option<u64>,
) -> Result<Vec<Key>, Error>
pub async fn keys<K>( &self, rng: Range<K>, limit: u32, version: Option<u64>, ) -> Result<Vec<Key>, Error>
Retrieve a specific range of keys from the datastore.
This function fetches the full range of keys, in a single request to the underlying datastore.
Sourcepub async fn scan<K>(
&self,
rng: Range<K>,
limit: u32,
version: Option<u64>,
) -> Result<Vec<(Key, Val)>, Error>
pub async fn scan<K>( &self, rng: Range<K>, limit: u32, version: Option<u64>, ) -> Result<Vec<(Key, Val)>, Error>
Retrieve a specific range of keys from the datastore.
This function fetches the full range of key-value pairs, in a single request to the underlying datastore.
Sourcepub async fn count<K>(&self, rng: Range<K>) -> Result<usize, Error>
pub async fn count<K>(&self, rng: Range<K>) -> Result<usize, Error>
Count the total number of keys within a range in the datastore.
This function fetches the total count, in batches, with multiple requests to the underlying datastore.
Sourcepub async fn batch_keys<K>(
&self,
rng: Range<K>,
batch: u32,
version: Option<u64>,
) -> Result<Batch<Key>, Error>
pub async fn batch_keys<K>( &self, rng: Range<K>, batch: u32, version: Option<u64>, ) -> Result<Batch<Key>, Error>
Retrieve a batched scan over a specific range of keys in the datastore.
This function fetches the keys in batches, with multiple requests to the underlying datastore.
Sourcepub async fn batch_keys_vals<K>(
&self,
rng: Range<K>,
batch: u32,
version: Option<u64>,
) -> Result<Batch<(Key, Val)>, Error>
pub async fn batch_keys_vals<K>( &self, rng: Range<K>, batch: u32, version: Option<u64>, ) -> Result<Batch<(Key, Val)>, Error>
Retrieve a batched scan over a specific range of keys in the datastore.
This function fetches the key-value pairs in batches, with multiple requests to the underlying datastore.
Sourcepub async fn batch_keys_vals_versions<K>(
&self,
rng: Range<K>,
batch: u32,
) -> Result<Batch<(Key, Val, Version, bool)>, Error>
pub async fn batch_keys_vals_versions<K>( &self, rng: Range<K>, batch: u32, ) -> Result<Batch<(Key, Val, Version, bool)>, Error>
Retrieve a batched scan over a specific range of keys in the datastore.
This function fetches the key-value-version pairs in batches, with multiple requests to the underlying datastore.
Sourcepub fn stream(
&self,
rng: Range<Vec<u8>>,
version: Option<u64>,
limit: Option<usize>,
) -> impl Stream<Item = Result<(Key, Val), Error>> + '_
pub fn stream( &self, rng: Range<Vec<u8>>, version: Option<u64>, limit: Option<usize>, ) -> impl Stream<Item = Result<(Key, Val), Error>> + '_
Retrieve a stream over a specific range of keys in the datastore.
This function fetches the key-value pairs in batches, with multiple requests to the underlying datastore.
pub fn stream_keys( &self, rng: Range<Vec<u8>>, limit: Option<usize>, ) -> impl Stream<Item = Result<Key, Error>> + '_
Sourcepub async fn rollback_with_warning(self) -> Self
pub async fn rollback_with_warning(self) -> Self
Warn if this transaction is dropped without proper handling.
Sourcepub async fn rollback_with_error(self) -> Self
pub async fn rollback_with_error(self) -> Self
Error if this transaction is dropped without proper handling.
Sourcepub async fn rollback_and_ignore(self) -> Self
pub async fn rollback_and_ignore(self) -> Self
Do nothing if this transaction is dropped without proper handling.
Sourcepub async fn all_nodes(&self) -> Result<Arc<[Node]>, Error>
pub async fn all_nodes(&self) -> Result<Arc<[Node]>, Error>
Retrieve all nodes belonging to this cluster.
Sourcepub async fn all_root_users(&self) -> Result<Arc<[DefineUserStatement]>, Error>
pub async fn all_root_users(&self) -> Result<Arc<[DefineUserStatement]>, Error>
Retrieve all ROOT level users in a datastore.
Sourcepub async fn all_root_accesses(
&self,
) -> Result<Arc<[DefineAccessStatement]>, Error>
pub async fn all_root_accesses( &self, ) -> Result<Arc<[DefineAccessStatement]>, Error>
Retrieve all ROOT level accesses in a datastore.
Sourcepub async fn all_root_access_grants(
&self,
ra: &str,
) -> Result<Arc<[AccessGrant]>, Error>
pub async fn all_root_access_grants( &self, ra: &str, ) -> Result<Arc<[AccessGrant]>, Error>
Retrieve all root access grants in a datastore.
Sourcepub async fn all_ns(&self) -> Result<Arc<[DefineNamespaceStatement]>, Error>
pub async fn all_ns(&self) -> Result<Arc<[DefineNamespaceStatement]>, Error>
Retrieve all namespace definitions in a datastore.
Sourcepub async fn all_ns_users(
&self,
ns: &str,
) -> Result<Arc<[DefineUserStatement]>, Error>
pub async fn all_ns_users( &self, ns: &str, ) -> Result<Arc<[DefineUserStatement]>, Error>
Retrieve all namespace user definitions for a specific namespace.
Sourcepub async fn all_ns_accesses(
&self,
ns: &str,
) -> Result<Arc<[DefineAccessStatement]>, Error>
pub async fn all_ns_accesses( &self, ns: &str, ) -> Result<Arc<[DefineAccessStatement]>, Error>
Retrieve all namespace access definitions for a specific namespace.
Sourcepub async fn all_ns_access_grants(
&self,
ns: &str,
na: &str,
) -> Result<Arc<[AccessGrant]>, Error>
pub async fn all_ns_access_grants( &self, ns: &str, na: &str, ) -> Result<Arc<[AccessGrant]>, Error>
Retrieve all namespace access grants for a specific namespace.
Sourcepub async fn all_db(
&self,
ns: &str,
) -> Result<Arc<[DefineDatabaseStatement]>, Error>
pub async fn all_db( &self, ns: &str, ) -> Result<Arc<[DefineDatabaseStatement]>, Error>
Retrieve all database definitions for a specific namespace.
Sourcepub async fn all_db_users(
&self,
ns: &str,
db: &str,
) -> Result<Arc<[DefineUserStatement]>, Error>
pub async fn all_db_users( &self, ns: &str, db: &str, ) -> Result<Arc<[DefineUserStatement]>, Error>
Retrieve all database user definitions for a specific database.
Sourcepub async fn all_db_accesses(
&self,
ns: &str,
db: &str,
) -> Result<Arc<[DefineAccessStatement]>, Error>
pub async fn all_db_accesses( &self, ns: &str, db: &str, ) -> Result<Arc<[DefineAccessStatement]>, Error>
Retrieve all database access definitions for a specific database.
Sourcepub async fn all_db_access_grants(
&self,
ns: &str,
db: &str,
da: &str,
) -> Result<Arc<[AccessGrant]>, Error>
pub async fn all_db_access_grants( &self, ns: &str, db: &str, da: &str, ) -> Result<Arc<[AccessGrant]>, Error>
Retrieve all database access grants for a specific database.
Sourcepub async fn all_db_analyzers(
&self,
ns: &str,
db: &str,
) -> Result<Arc<[DefineAnalyzerStatement]>, Error>
pub async fn all_db_analyzers( &self, ns: &str, db: &str, ) -> Result<Arc<[DefineAnalyzerStatement]>, Error>
Retrieve all analyzer definitions for a specific database.
Sourcepub async fn all_db_functions(
&self,
ns: &str,
db: &str,
) -> Result<Arc<[DefineFunctionStatement]>, Error>
pub async fn all_db_functions( &self, ns: &str, db: &str, ) -> Result<Arc<[DefineFunctionStatement]>, Error>
Retrieve all function definitions for a specific database.
Sourcepub async fn all_db_params(
&self,
ns: &str,
db: &str,
) -> Result<Arc<[DefineParamStatement]>, Error>
pub async fn all_db_params( &self, ns: &str, db: &str, ) -> Result<Arc<[DefineParamStatement]>, Error>
Retrieve all param definitions for a specific database.
Sourcepub async fn all_db_models(
&self,
ns: &str,
db: &str,
) -> Result<Arc<[DefineModelStatement]>, Error>
pub async fn all_db_models( &self, ns: &str, db: &str, ) -> Result<Arc<[DefineModelStatement]>, Error>
Retrieve all model definitions for a specific database.
Sourcepub async fn all_db_configs(
&self,
ns: &str,
db: &str,
) -> Result<Arc<[DefineConfigStatement]>, Error>
pub async fn all_db_configs( &self, ns: &str, db: &str, ) -> Result<Arc<[DefineConfigStatement]>, Error>
Retrieve all model definitions for a specific database.
Sourcepub async fn all_tb(
&self,
ns: &str,
db: &str,
version: Option<u64>,
) -> Result<Arc<[DefineTableStatement]>, Error>
pub async fn all_tb( &self, ns: &str, db: &str, version: Option<u64>, ) -> Result<Arc<[DefineTableStatement]>, Error>
Retrieve all table definitions for a specific database.
Sourcepub async fn all_tb_events(
&self,
ns: &str,
db: &str,
tb: &str,
) -> Result<Arc<[DefineEventStatement]>, Error>
pub async fn all_tb_events( &self, ns: &str, db: &str, tb: &str, ) -> Result<Arc<[DefineEventStatement]>, Error>
Retrieve all event definitions for a specific table.
Sourcepub async fn all_tb_fields(
&self,
ns: &str,
db: &str,
tb: &str,
version: Option<u64>,
) -> Result<Arc<[DefineFieldStatement]>, Error>
pub async fn all_tb_fields( &self, ns: &str, db: &str, tb: &str, version: Option<u64>, ) -> Result<Arc<[DefineFieldStatement]>, Error>
Retrieve all field definitions for a specific table.
Sourcepub async fn all_tb_indexes(
&self,
ns: &str,
db: &str,
tb: &str,
) -> Result<Arc<[DefineIndexStatement]>, Error>
pub async fn all_tb_indexes( &self, ns: &str, db: &str, tb: &str, ) -> Result<Arc<[DefineIndexStatement]>, Error>
Retrieve all index definitions for a specific table.
Sourcepub async fn all_tb_views(
&self,
ns: &str,
db: &str,
tb: &str,
) -> Result<Arc<[DefineTableStatement]>, Error>
pub async fn all_tb_views( &self, ns: &str, db: &str, tb: &str, ) -> Result<Arc<[DefineTableStatement]>, Error>
Retrieve all view definitions for a specific table.
Sourcepub async fn all_tb_lives(
&self,
ns: &str,
db: &str,
tb: &str,
) -> Result<Arc<[LiveStatement]>, Error>
pub async fn all_tb_lives( &self, ns: &str, db: &str, tb: &str, ) -> Result<Arc<[LiveStatement]>, Error>
Retrieve all live definitions for a specific table.
Sourcepub async fn get_node(&self, id: Uuid) -> Result<Arc<Node>, Error>
pub async fn get_node(&self, id: Uuid) -> Result<Arc<Node>, Error>
Retrieve a specific node in the cluster.
Sourcepub async fn get_root_user(
&self,
us: &str,
) -> Result<Arc<DefineUserStatement>, Error>
pub async fn get_root_user( &self, us: &str, ) -> Result<Arc<DefineUserStatement>, Error>
Retrieve a specific root user definition.
Sourcepub async fn get_root_access(
&self,
ra: &str,
) -> Result<Arc<DefineAccessStatement>, Error>
pub async fn get_root_access( &self, ra: &str, ) -> Result<Arc<DefineAccessStatement>, Error>
Retrieve a specific root access definition.
Sourcepub async fn get_root_access_grant(
&self,
ac: &str,
gr: &str,
) -> Result<Arc<AccessGrant>, Error>
pub async fn get_root_access_grant( &self, ac: &str, gr: &str, ) -> Result<Arc<AccessGrant>, Error>
Retrieve a specific root access grant.
Sourcepub async fn get_ns(
&self,
ns: &str,
) -> Result<Arc<DefineNamespaceStatement>, Error>
pub async fn get_ns( &self, ns: &str, ) -> Result<Arc<DefineNamespaceStatement>, Error>
Retrieve a specific namespace definition.
Sourcepub async fn get_ns_user(
&self,
ns: &str,
us: &str,
) -> Result<Arc<DefineUserStatement>, Error>
pub async fn get_ns_user( &self, ns: &str, us: &str, ) -> Result<Arc<DefineUserStatement>, Error>
Retrieve a specific namespace user definition.
Sourcepub async fn get_ns_access(
&self,
ns: &str,
na: &str,
) -> Result<Arc<DefineAccessStatement>, Error>
pub async fn get_ns_access( &self, ns: &str, na: &str, ) -> Result<Arc<DefineAccessStatement>, Error>
Retrieve a specific namespace access definition.
Sourcepub async fn get_ns_access_grant(
&self,
ns: &str,
ac: &str,
gr: &str,
) -> Result<Arc<AccessGrant>, Error>
pub async fn get_ns_access_grant( &self, ns: &str, ac: &str, gr: &str, ) -> Result<Arc<AccessGrant>, Error>
Retrieve a specific namespace access grant.
Sourcepub async fn get_db(
&self,
ns: &str,
db: &str,
) -> Result<Arc<DefineDatabaseStatement>, Error>
pub async fn get_db( &self, ns: &str, db: &str, ) -> Result<Arc<DefineDatabaseStatement>, Error>
Retrieve a specific database definition.
Sourcepub async fn get_db_user(
&self,
ns: &str,
db: &str,
us: &str,
) -> Result<Arc<DefineUserStatement>, Error>
pub async fn get_db_user( &self, ns: &str, db: &str, us: &str, ) -> Result<Arc<DefineUserStatement>, Error>
Retrieve a specific user definition from a database.
Sourcepub async fn get_db_access(
&self,
ns: &str,
db: &str,
da: &str,
) -> Result<Arc<DefineAccessStatement>, Error>
pub async fn get_db_access( &self, ns: &str, db: &str, da: &str, ) -> Result<Arc<DefineAccessStatement>, Error>
Retrieve a specific database access definition.
Sourcepub async fn get_db_access_grant(
&self,
ns: &str,
db: &str,
ac: &str,
gr: &str,
) -> Result<Arc<AccessGrant>, Error>
pub async fn get_db_access_grant( &self, ns: &str, db: &str, ac: &str, gr: &str, ) -> Result<Arc<AccessGrant>, Error>
Retrieve a specific database access grant.
Sourcepub async fn get_db_model(
&self,
ns: &str,
db: &str,
ml: &str,
vn: &str,
) -> Result<Arc<DefineModelStatement>, Error>
pub async fn get_db_model( &self, ns: &str, db: &str, ml: &str, vn: &str, ) -> Result<Arc<DefineModelStatement>, Error>
Retrieve a specific model definition from a database.
Sourcepub async fn get_db_analyzer(
&self,
ns: &str,
db: &str,
az: &str,
) -> Result<Arc<DefineAnalyzerStatement>, Error>
pub async fn get_db_analyzer( &self, ns: &str, db: &str, az: &str, ) -> Result<Arc<DefineAnalyzerStatement>, Error>
Retrieve a specific analyzer definition.
Sourcepub async fn get_db_function(
&self,
ns: &str,
db: &str,
fc: &str,
) -> Result<Arc<DefineFunctionStatement>, Error>
pub async fn get_db_function( &self, ns: &str, db: &str, fc: &str, ) -> Result<Arc<DefineFunctionStatement>, Error>
Retrieve a specific function definition from a database.
Sourcepub async fn get_db_param(
&self,
ns: &str,
db: &str,
pa: &str,
) -> Result<Arc<DefineParamStatement>, Error>
pub async fn get_db_param( &self, ns: &str, db: &str, pa: &str, ) -> Result<Arc<DefineParamStatement>, Error>
Retrieve a specific function definition from a database.
Sourcepub async fn get_db_config(
&self,
ns: &str,
db: &str,
cg: &str,
) -> Result<Arc<DefineConfigStatement>, Error>
pub async fn get_db_config( &self, ns: &str, db: &str, cg: &str, ) -> Result<Arc<DefineConfigStatement>, Error>
Retrieve a specific config definition from a database.
Sourcepub async fn get_tb(
&self,
ns: &str,
db: &str,
tb: &str,
) -> Result<Arc<DefineTableStatement>, Error>
pub async fn get_tb( &self, ns: &str, db: &str, tb: &str, ) -> Result<Arc<DefineTableStatement>, Error>
Retrieve a specific table definition.
Sourcepub async fn get_tb_event(
&self,
ns: &str,
db: &str,
tb: &str,
ev: &str,
) -> Result<Arc<DefineEventStatement>, Error>
pub async fn get_tb_event( &self, ns: &str, db: &str, tb: &str, ev: &str, ) -> Result<Arc<DefineEventStatement>, Error>
Retrieve an event for a table.
Sourcepub async fn get_tb_field(
&self,
ns: &str,
db: &str,
tb: &str,
fd: &str,
) -> Result<Arc<DefineFieldStatement>, Error>
pub async fn get_tb_field( &self, ns: &str, db: &str, tb: &str, fd: &str, ) -> Result<Arc<DefineFieldStatement>, Error>
Retrieve a field for a table.
Sourcepub async fn get_tb_index(
&self,
ns: &str,
db: &str,
tb: &str,
ix: &str,
) -> Result<Arc<DefineIndexStatement>, Error>
pub async fn get_tb_index( &self, ns: &str, db: &str, tb: &str, ix: &str, ) -> Result<Arc<DefineIndexStatement>, Error>
Retrieve an index for a table.
Sourcepub async fn get_record(
&self,
ns: &str,
db: &str,
tb: &str,
id: &Id,
version: Option<u64>,
) -> Result<Arc<Value>, Error>
pub async fn get_record( &self, ns: &str, db: &str, tb: &str, id: &Id, version: Option<u64>, ) -> Result<Arc<Value>, Error>
Fetch a specific record value.
pub async fn set_record( &self, ns: &str, db: &str, tb: &str, id: &Id, val: Value, ) -> Result<(), Error>
pub fn set_record_cache( &self, ns: &str, db: &str, tb: &str, id: &Id, val: Arc<Value>, ) -> Result<(), Error>
pub async fn del_record( &self, ns: &str, db: &str, tb: &str, id: &Id, ) -> Result<(), Error>
Sourcepub async fn get_or_add_ns(
&self,
ns: &str,
strict: bool,
) -> Result<Arc<DefineNamespaceStatement>, Error>
pub async fn get_or_add_ns( &self, ns: &str, strict: bool, ) -> Result<Arc<DefineNamespaceStatement>, Error>
Get or add a namespace with a default configuration, only if we are in dynamic mode.
Sourcepub async fn get_or_add_db(
&self,
ns: &str,
db: &str,
strict: bool,
) -> Result<Arc<DefineDatabaseStatement>, Error>
pub async fn get_or_add_db( &self, ns: &str, db: &str, strict: bool, ) -> Result<Arc<DefineDatabaseStatement>, Error>
Get or add a database with a default configuration, only if we are in dynamic mode.
Sourcepub async fn get_or_add_tb(
&self,
ns: &str,
db: &str,
tb: &str,
strict: bool,
) -> Result<Arc<DefineTableStatement>, Error>
pub async fn get_or_add_tb( &self, ns: &str, db: &str, tb: &str, strict: bool, ) -> Result<Arc<DefineTableStatement>, Error>
Get or add a table with a default configuration, only if we are in dynamic mode.
Sourcepub async fn ensure_ns_db_tb(
&self,
ns: &str,
db: &str,
tb: &str,
strict: bool,
) -> Result<Arc<DefineTableStatement>, Error>
pub async fn ensure_ns_db_tb( &self, ns: &str, db: &str, tb: &str, strict: bool, ) -> Result<Arc<DefineTableStatement>, Error>
Ensures that a table, database, and namespace are all fully defined.
Trait Implementations§
Source§impl From<Transaction> for MutableContext
impl From<Transaction> for MutableContext
Source§fn from(txn: Transaction) -> Self
fn from(txn: Transaction) -> Self
Auto Trait Implementations§
impl !Freeze for Transaction
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl !UnwindSafe for Transaction
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
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>
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>
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 more