parse_rust_storage/lib.rs
1//! `StorageAdapter` trait and the query/update AST adapters lower.
2//!
3//! **The trait must be shaped by two consumers, not one.** Building against Mongo alone bakes
4//! Mongo-isms (BSON semantics, `$` operators, implicit schema) into the interface, and the
5//! Postgres port then fights it, which is roughly what happened upstream and produced the 55
6//! catalogued divergences. The rule: if a method can only be implemented sensibly for one
7//! backend, the trait is wrong.
8//!
9//! Only the pieces the 0.1.0 proof of concept needs exist so far: schemas, a small constraint
10//! vocabulary, and the CRUD verbs. Aggregation, relations and transactions are absent.
11
12#![forbid(unsafe_code)]
13#![cfg_attr(
14 not(test),
15 deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)
16)]
17
18pub mod adapter;
19pub mod query;
20pub mod schema;
21
22pub use adapter::{Row, StorageAdapter, WriteResult};
23pub use query::{Comparison, Constraint, QueryOptions, SortDirection};
24pub use schema::{ClassSchema, FieldType};