Expand description
§Vantage Table
Table = DataSet with Columns
This crate provides definition for Columns, TableSource - necessary trait for Database SDKs to implement.
Additionally this crate implements generic Table struct and AnyTable type-erasing wrapper.
§Example
ⓘ
use vantage_table::{Table, Column, EmptyEntity};
use vantage_expressions::expr;
// Create a new table with a datasource
let mut table = Table::new("users", my_datasource);
// Add columns
table.add_column(Column::new("name"));
table.add_column(Column::new("email").with_alias("user_email"));
// Add conditions
table.add_condition(expr!("age > {}", 18));
table.add_condition(expr!("status = {}", "active"));
// Or use the builder pattern
let table = Table::new("users", my_datasource)
.with(|t| {
t.add_column(Column::new("name"));
t.add_condition(expr!("active = {}", true));
});Modules§
- any
- Type-erased table wrapper with downcasting support
- cbor_
ext - Convenience accessors for
ciborium::Valuethat mirror the muscle-memory API ofserde_json::Value. - column
- Column
- conditions
- mocks
- pagination
- prelude
- Prelude module for vantage-table
- references
- Table reference system for relationships between tables.
- sorting
- Sorting-related support data-types
- source
- table
- Table is our generic implementation of remote record collection, that may have columns and supports column operations (like sorting or filtering).
- traits