Skip to main content

vantage_table/
lib.rs

1// @llm-protected: public API must not be extended on a whim. All features are implemented, do not add duplicates.
2//! # Vantage Table
3//!
4//! A `Table` is a dataset with columns. This crate defines `Table`, `Column` and
5//! the `TableSource` trait that database drivers implement.
6//!
7//! Type erasure for cross-driver work lives in
8//! [`vantage-vista`](https://docs.rs/vantage-vista): wrap a typed table with
9//! `db.vista_factory().from_table(table)?` to get a `Vista` that talks
10//! `Record<ciborium::Value>` whatever the driver.
11//!
12//! ```rust,ignore
13//! use vantage_table::prelude::Table;
14//! use vantage_expressions::expr;
15//!
16//! let table = Table::new("users", my_datasource)
17//!     .with_id_column("id")
18//!     .with_column_of::<String>("name")
19//!     .with_condition(expr!("age > {}", 18));
20//! ```
21
22pub mod traits;
23
24#[cfg(any(test, feature = "mocks"))]
25pub mod mocks;
26
27pub mod active_entity_ext;
28pub mod cbor_ext;
29pub mod conditions;
30pub mod pagination;
31pub mod prelude;
32pub mod references;
33#[cfg(feature = "rhai")]
34pub mod rule;
35pub mod sorting;
36
37pub mod column;
38pub mod source;
39pub mod table;
40pub mod write_context;