1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! SurrealDB statement builders.
//!
//! Provides type-safe builders for the four core SurrealDB statements:
//!
//! - [`SurrealSelect`] — `SELECT` queries with fields, conditions, ordering, grouping, limits
//! - [`SurrealInsert`] — `CREATE` statements with typed fields and optional record IDs
//! - [`SurrealUpdate`] — `UPDATE` statements in `SET`, `CONTENT`, or `MERGE` mode
//! - [`SurrealDelete`] — `DELETE` statements targeting records or whole tables
//!
//! All builders implement [`Expressive<AnySurrealType>`](vantage_expressions::Expressive),
//! producing parameterized expressions safe for execution via
//! [`ExprDataSource::execute()`](vantage_expressions::ExprDataSource::execute).
//!
//! # Consistent API
//!
//! Insert, Update, and Delete share a common builder pattern:
//!
//! | Method | Insert | Update | Delete |
//! |---|---|---|---|
//! | `::new(target)` | table name | any `Expressive` | any `Expressive` |
//! | `::table(name)` | — | table name | table name |
//! | `.with_id(id)` | ✓ | — | — |
//! | `.with_field(k, v)` | ✓ | ✓ | — |
//! | `.with_any_field(k, v)` | ✓ | ✓ | — |
//! | `.with_record(rec)` | ✓ | ✓ | — |
//! | `.with_condition(expr)` | — | ✓ | ✓ |
//! | `.content()` / `.merge()` / `.set()` | — | ✓ | — |
pub use SurrealDelete;
pub use SurrealInsert;
pub use SurrealSelect;
pub use SurrealUpdate;