Trait tc_table::TableInstance [−][src]
pub trait TableInstance<F: File<Node>, D: Dir, Txn: Transaction<D>>: Instance<Class = TableType> + Clone + Sized + Into<Table<F, D, Txn>> { type OrderBy: TableInstance<F, D, Txn>; type Reverse: TableInstance<F, D, Txn>; type Slice: TableInstance<F, D, Txn>;}Show methods
fn key(&self) -> &[Column]; fn values(&self) -> &[Column]; fn schema(&self) -> TableSchema; fn order_by(
self,
columns: Vec<Id>,
reverse: bool
) -> TCResult<Self::OrderBy>; fn reversed(self) -> TCResult<Self::Reverse>; #[must_use] fn rows<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Vec<Value>>>> + Send + 'async_trait>>
where
'a: 'async_trait,
Self: 'async_trait; fn validate_bounds(&self, bounds: &Bounds) -> TCResult<()>; fn validate_order(&self, order: &[Id]) -> TCResult<()>; #[must_use] fn count<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>>
where
Self: Send + 'async_trait, { ... } #[must_use] fn delete<'life0, 'async_trait>(
&'life0 self,
_txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait, { ... } #[must_use] fn delete_row<'life0, 'async_trait>(
&'life0 self,
_txn_id: TxnId,
_row: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait, { ... } fn group_by(
self,
columns: Vec<Id>
) -> TCResult<Aggregate<F, D, Txn, Self::OrderBy>> { ... } #[must_use] fn index<'async_trait>(
self,
txn: Txn,
columns: Option<Vec<Id>>
) -> Pin<Box<dyn Future<Output = TCResult<ReadOnly<F, D, Txn>>> + Send + 'async_trait>>
where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
Self: Send + 'async_trait, { ... } fn limit(self, limit: u64) -> Limited<F, D, Txn> { ... } fn select(self, columns: Vec<Id>) -> TCResult<Selection<F, D, Txn, Self>> { ... } fn slice(self, _bounds: Bounds) -> TCResult<Self::Slice> { ... } #[must_use] fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
_txn: &'life1 Txn,
_value: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait, { ... } #[must_use] fn update_row<'life0, 'async_trait>(
&'life0 self,
_txn_id: TxnId,
_row: Row,
_value: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait, { ... } #[must_use] fn upsert<'life0, 'async_trait>(
&'life0 self,
_txn_id: TxnId,
_key: Vec<Value>,
_value: Vec<Value>
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait, { ... }
Expand description
Common Table
methods.
Associated Types
type OrderBy: TableInstance<F, D, Txn>
[src]
type OrderBy: TableInstance<F, D, Txn>
[src]The type of Table
returned by this instance’s order_by
method.
type Reverse: TableInstance<F, D, Txn>
[src]
type Reverse: TableInstance<F, D, Txn>
[src]The type of Table
returned by this instance’s reversed
method.
type Slice: TableInstance<F, D, Txn>
[src]
type Slice: TableInstance<F, D, Txn>
[src]The type of Table
returned by this instance’s slice
method.
Required methods
fn schema(&self) -> TableSchema
[src]
fn schema(&self) -> TableSchema
[src]Return the schema of this Table
.
fn order_by(self, columns: Vec<Id>, reverse: bool) -> TCResult<Self::OrderBy>
[src]
fn order_by(self, columns: Vec<Id>, reverse: bool) -> TCResult<Self::OrderBy>
[src]Set the order returned by rows
.
#[must_use]fn rows<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Vec<Value>>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn rows<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Vec<Value>>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]Return a stream of the rows in this Table
.
Provided methods
#[must_use]fn count<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>> where
Self: Send + 'async_trait,
[src]
#[must_use]fn count<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>> where
Self: Send + 'async_trait,
[src]Return the number of rows in this Table
.
#[must_use]fn delete<'life0, 'async_trait>(
&'life0 self,
_txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
#[must_use]fn delete<'life0, 'async_trait>(
&'life0 self,
_txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]Delete all rows in this Table
.
#[must_use]fn delete_row<'life0, 'async_trait>(
&'life0 self,
_txn_id: TxnId,
_row: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
#[must_use]fn delete_row<'life0, 'async_trait>(
&'life0 self,
_txn_id: TxnId,
_row: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]Delete the given Row
from this table, if present.
fn group_by(
self,
columns: Vec<Id>
) -> TCResult<Aggregate<F, D, Txn, Self::OrderBy>>
[src]
fn group_by(
self,
columns: Vec<Id>
) -> TCResult<Aggregate<F, D, Txn, Self::OrderBy>>
[src]Group this Table
by the given columns.
#[must_use]fn index<'async_trait>(
self,
txn: Txn,
columns: Option<Vec<Id>>
) -> Pin<Box<dyn Future<Output = TCResult<ReadOnly<F, D, Txn>>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
Self: Send + 'async_trait,
[src]
#[must_use]fn index<'async_trait>(
self,
txn: Txn,
columns: Option<Vec<Id>>
) -> Pin<Box<dyn Future<Output = TCResult<ReadOnly<F, D, Txn>>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
Self: Send + 'async_trait,
[src]Construct and return a temporary index of the given columns.
fn select(self, columns: Vec<Id>) -> TCResult<Selection<F, D, Txn, Self>>
[src]
fn select(self, columns: Vec<Id>) -> TCResult<Selection<F, D, Txn, Self>>
[src]Limit the columns returned by rows
.
fn slice(self, _bounds: Bounds) -> TCResult<Self::Slice>
[src]
fn slice(self, _bounds: Bounds) -> TCResult<Self::Slice>
[src]Limit the returned rows
to the given Bounds
.
#[must_use]fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
_txn: &'life1 Txn,
_value: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
[src]
#[must_use]fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
_txn: &'life1 Txn,
_value: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
[src]Update the values of the columns in this Table
to match the given Row
.
Implementors
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableInstance<F, D, Txn> for Table<F, D, Txn>
[src]
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableInstance<F, D, Txn> for Table<F, D, Txn>
[src]type OrderBy = Self
type Reverse = Self
type Slice = Self
fn count<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>> where
Self: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn delete_row<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
row: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId,
row: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn index<'async_trait>(
self,
txn: Txn,
columns: Option<Vec<Id>>
) -> Pin<Box<dyn Future<Output = TCResult<ReadOnly<F, D, Txn>>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
Self: 'async_trait,
[src]
self,
txn: Txn,
columns: Option<Vec<Id>>
) -> Pin<Box<dyn Future<Output = TCResult<ReadOnly<F, D, Txn>>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
Self: 'async_trait,
fn key(&self) -> &[Column]
[src]
fn values(&self) -> &[Column]
[src]
fn schema(&self) -> TableSchema
[src]
fn limit(self, limit: u64) -> Limited<F, D, Txn>
[src]
fn order_by(self, order: Vec<Id>, reverse: bool) -> TCResult<Self::OrderBy>
[src]
fn reversed(self) -> TCResult<Self::Reverse>
[src]
fn slice(self, bounds: Bounds) -> TCResult<Table<F, D, Txn>>
[src]
fn rows<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Vec<Value>>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Vec<Value>>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
fn validate_bounds(&self, bounds: &Bounds) -> TCResult<()>
[src]
fn validate_order(&self, order: &[Id]) -> TCResult<()>
[src]
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
txn: &'life1 Txn,
value: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn: &'life1 Txn,
value: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn update_row<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
row: Row,
value: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId,
row: Row,
value: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn upsert<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
key: Vec<Value>,
values: Vec<Value>
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId,
key: Vec<Value>,
values: Vec<Value>
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableInstance<F, D, Txn> for TableIndex<F, D, Txn>
[src]
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableInstance<F, D, Txn> for TableIndex<F, D, Txn>
[src]type OrderBy = Merged<F, D, Txn>
type Reverse = Merged<F, D, Txn>
type Slice = Merged<F, D, Txn>
fn count<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>> where
Self: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn delete_row<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
row: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId,
row: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn key(&self) -> &[Column]
[src]
fn values(&self) -> &[Column]
[src]
fn schema(&self) -> TableSchema
[src]
fn order_by(self, columns: Vec<Id>, reverse: bool) -> TCResult<Self::OrderBy>
[src]
fn reversed(self) -> TCResult<Self::Reverse>
[src]
fn slice(self, bounds: Bounds) -> TCResult<Merged<F, D, Txn>>
[src]
fn rows<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Vec<Value>>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Vec<Value>>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
fn validate_bounds(&self, bounds: &Bounds) -> TCResult<()>
[src]
fn validate_order(&self, order: &[Id]) -> TCResult<()>
[src]
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
txn: &'life1 Txn,
update: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn: &'life1 Txn,
update: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
F: TryFrom<D::File, Error = TCError>,
D::FileClass: From<BTreeType>,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn update_row<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
row: Row,
update: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId,
row: Row,
update: Row
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn upsert<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
key: Vec<Value>,
values: Vec<Value>
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId,
key: Vec<Value>,
values: Vec<Value>
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,