pub trait RelationalExecutor: Send + Sync {
// Required methods
fn scan(
&self,
table: &str,
snapshot: SnapshotId,
) -> Result<Vec<VersionedRow>>;
fn scan_filter(
&self,
table: &str,
snapshot: SnapshotId,
predicate: &dyn Fn(&VersionedRow) -> bool,
) -> Result<Vec<VersionedRow>>;
fn point_lookup(
&self,
table: &str,
col: &str,
value: &Value,
snapshot: SnapshotId,
) -> Result<Option<VersionedRow>>;
fn insert(
&self,
tx: TxId,
table: &str,
values: HashMap<ColName, Value>,
) -> Result<RowId>;
fn upsert(
&self,
tx: TxId,
table: &str,
conflict_col: &str,
values: HashMap<ColName, Value>,
snapshot: SnapshotId,
) -> Result<UpsertResult>;
fn delete(&self, tx: TxId, table: &str, row_id: RowId) -> Result<()>;
}Required Methods§
fn scan(&self, table: &str, snapshot: SnapshotId) -> Result<Vec<VersionedRow>>
fn scan_filter( &self, table: &str, snapshot: SnapshotId, predicate: &dyn Fn(&VersionedRow) -> bool, ) -> Result<Vec<VersionedRow>>
fn point_lookup( &self, table: &str, col: &str, value: &Value, snapshot: SnapshotId, ) -> Result<Option<VersionedRow>>
fn insert( &self, tx: TxId, table: &str, values: HashMap<ColName, Value>, ) -> Result<RowId>
fn upsert( &self, tx: TxId, table: &str, conflict_col: &str, values: HashMap<ColName, Value>, snapshot: SnapshotId, ) -> Result<UpsertResult>
fn delete(&self, tx: TxId, table: &str, row_id: RowId) -> Result<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".