Skip to main content

vantage_surrealdb/
lib.rs

1//! # Vantage SurrealDB Extension
2//!
3//! Extends Vantage by adding Query Builders for SurrealDB. Standard
4//! functionality is implemented through protocol, advanced SurrealDB-only
5//! features are implemented as part of default impl.
6//!
7//! ## Features
8//!
9//! Implements the following database interaction protocols:
10//!
11//! - SurrealSelect implements SelectQuery
12
13// pub mod associated_query;
14// pub mod conditional;
15
16// pub mod field_projection;
17pub mod field;
18pub mod identifier;
19pub mod operation;
20// pub mod protocol;
21pub mod ext;
22pub mod macros;
23pub mod primitives;
24pub mod statements;
25pub mod sum;
26pub mod surreal_return;
27pub mod surrealdb;
28// pub mod prelude;
29// pub mod column;
30// pub mod table;
31pub mod thing;
32// pub mod typed_expression;
33pub mod variable;
34
35#[cfg(feature = "vista")]
36pub mod vista;
37
38#[cfg(feature = "rhai")]
39pub mod rhai_engine;
40
41// Re-export statement builders at crate root for convenience
42pub use statements::SurrealDelete;
43pub use statements::SurrealInsert;
44pub use statements::SurrealSelect;
45pub use statements::SurrealUpdate;
46
47// Backwards-compat module aliases
48pub use statements::delete;
49pub use statements::insert;
50pub use statements::select;
51pub use statements::update;
52
53// SurrealDB expression support using vantage-expressions with AnySurrealType
54pub type Expr = vantage_expressions::Expression<AnySurrealType>;
55
56// Add types module
57pub mod types;
58pub use types::*;
59
60// Re-export extension trait
61pub use ext::SurrealTableExt;
62
63// Re-export main SurrealDB types for convenience
64pub use ciborium::Value as CborValue;
65pub use types::{AnySurrealType, SurrealType, SurrealTypeVariants};