pub struct Space<E> { /* private fields */ }
Expand description
Tarantool space.
This is a wrapper around Executor
, which allow to make space-related requests
on specific space. All requests over index uses primary index.
Implementations§
Source§impl<E> Space<E>
impl<E> Space<E>
pub fn executor(&self) -> &E
pub fn metadata(&self) -> &SpaceMetadata
pub fn into_executor(self) -> E
pub fn primary_index(&self) -> Index<'_, &E>
pub fn index(&self, key: impl Into<SchemaEntityKey>) -> Option<Index<'_, &E>>
Source§impl<E: Clone> Space<E>
impl<E: Clone> Space<E>
pub fn owned_primary_index(&self) -> OwnedIndex<E>
pub fn owned_index( &self, key: impl Into<SchemaEntityKey>, ) -> Option<OwnedIndex<E>>
Source§impl<E: Executor> Space<E>
impl<E: Executor> Space<E>
Sourcepub fn indices(&self) -> impl Iterator<Item = Index<'_, &E>>
pub fn indices(&self) -> impl Iterator<Item = Index<'_, &E>>
Iterator over indices in this space.
Sourcepub async fn select<T, A>(
&self,
limit: Option<u32>,
offset: Option<u32>,
iterator: Option<IteratorType>,
keys: A,
) -> Result<Vec<T>>
pub async fn select<T, A>( &self, limit: Option<u32>, offset: Option<u32>, iterator: Option<IteratorType>, keys: A, ) -> Result<Vec<T>>
Call select
with primary index on current space.
For details see ExecutorExt::select
.
Sourcepub async fn insert<T>(&self, tuple: T) -> Result<DmoResponse>
pub async fn insert<T>(&self, tuple: T) -> Result<DmoResponse>
Call insert
on current space.
For details see ExecutorExt::insert
.
Sourcepub async fn update<K, O>(&self, keys: K, ops: O) -> Result<DmoResponse>
pub async fn update<K, O>(&self, keys: K, ops: O) -> Result<DmoResponse>
Call update
with primary index on current space.
For details see ExecutorExt::update
.
Sourcepub async fn upsert<T, O>(&self, tuple: T, ops: O) -> Result<DmoResponse>
pub async fn upsert<T, O>(&self, tuple: T, ops: O) -> Result<DmoResponse>
Call upsert
on current space.
For details see ExecutorExt::upsert
.
Sourcepub async fn replace<T>(&self, tuple: T) -> Result<DmoResponse>
pub async fn replace<T>(&self, tuple: T) -> Result<DmoResponse>
Call replace
on current space.
For details see ExecutorExt::replace
.
Sourcepub async fn delete<T>(&self, keys: T) -> Result<DmoResponse>
pub async fn delete<T>(&self, keys: T) -> Result<DmoResponse>
Call delete
with primary index on current space.
For details see ExecutorExt::delete
.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Space<E>where
E: Freeze,
impl<E> RefUnwindSafe for Space<E>where
E: RefUnwindSafe,
impl<E> Send for Space<E>where
E: Send,
impl<E> Sync for Space<E>where
E: Sync,
impl<E> Unpin for Space<E>where
E: Unpin,
impl<E> UnwindSafe for Space<E>where
E: UnwindSafe,
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