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>;
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<()>; fn count<'async_trait>(
        self,
        txn_id: TxnId
    ) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>>
    where
        Self: Send + '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: Sync + '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: Sync + 'async_trait
, { ... }
fn group_by(
        self,
        columns: Vec<Id>
    ) -> TCResult<Aggregate<F, D, Txn, Self::OrderBy>> { ... }
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> { ... }
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
, { ... }
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
, { ... }
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

The type of Table returned by this instance’s order_by method.

The type of Table returned by this instance’s reversed method.

The type of Table returned by this instance’s slice method.

Required methods

Return the schema of this Table’s key.

Return the schema of this Table’s values.

Return the schema of this Table.

Set the order returned by rows.

Reverse the order returned by rows.

Return a stream of the rows in this Table.

Return an error if this table does not support the given Bounds.

Return an error if this table does not support ordering by the given columns.

Provided methods

Return the number of rows in this Table.

Delete all rows in this Table.

Delete the given Row from this table, if present.

Group this Table by the given columns.

Construct and return a temporary index of the given columns.

Limit the number of rows returned by rows.

Limit the columns returned by rows.

Limit the returned rows to the given Bounds.

Update the values of the columns in this Table to match the given Row.

Update one row of this Table.

Insert or update the given row.

Implementors