Skip to main content

Crate vantage_table

Crate vantage_table 

Source
Expand description

§Vantage Table

A Table is a dataset with columns. This crate defines Table, Column and the TableSource trait that database drivers implement.

Type erasure for cross-driver work lives in vantage-vista: wrap a typed table with db.vista_factory().from_table(table)? to get a Vista that talks Record<ciborium::Value> whatever the driver.

ⓘ
use vantage_table::prelude::Table;
use vantage_expressions::expr;

let table = Table::new("users", my_datasource)
    .with_id_column("id")
    .with_column_of::<String>("name")
    .with_condition(expr!("age > {}", 18));

Modules§

active_entity_ext
Relationship traversal from a loaded record handle.
cbor_ext
serde_json::Value-style accessors for ciborium::Value: the short names (as_str, as_i64) and string-keyed map lookup that ciborium lacks.
column
Column
conditions
pagination
prelude
The commonly used types and traits of vantage-table, for use vantage_table::prelude::*;.
references
Table reference system for relationships between tables.
sorting
Sorting-related support data-types
source
Source representation for tables whose FROM clause may be a sub-SELECT.
table
Table<T, E>: a record collection with columns, conditions, ordering and pagination, over a TableSource T and an entity E. A source that also implements query or select sources unlocks the extra methods under impls. Type erasure for cross-driver work lives in vantage-vista.
traits
write_context
Who is making a write, carried to the table’s lifecycle hooks.