Skip to main content

mongreldb_kit_core/
lib.rs

1//! Core, language-neutral model for MongrelDB Kit.
2//!
3//! This crate contains the schema model, key encoding, validation, constraint
4//! planning, migration planning, and query AST used by the storage-backed
5//! `mongreldb-kit` crate and by language bindings.
6
7pub mod check;
8pub mod keys;
9pub mod migrations;
10pub mod planner;
11pub mod procedure;
12pub mod query;
13pub mod schema;
14pub mod validation;
15
16pub use check::{eval_check, CheckParseError};
17pub use keys::{
18    decode_pk, encode_component, encode_pk, encode_row_guard_key, encode_unique_key, KeyComponent,
19    KIT_KEY_VERSION,
20};
21pub use migrations::{migration_checksum, plan_migrations, Migration, MigrationOp};
22pub use planner::{
23    plan_delete, DeletePlan, PlannerError, RestrictedConstraint, RowRef, SetNullUpdate,
24};
25pub use procedure::ProcedureSpec;
26pub use query::{
27    AggFunc, Aggregate, AggregateQuery, Cte, Delete, Direction, Expr, Insert, Join, JoinKind,
28    JoinQuery, Literal, OnConflict, OrderBy, Query, Select, Update, Upsert,
29};
30pub use schema::{
31    CheckConstraint, Column, ColumnType, DefaultKind, ForeignKey, ForeignKeyAction, Index,
32    IndexKind, Schema, SchemaError, Sequence, Table, UniqueConstraint,
33};
34pub use validation::{validate_row, ValidationError};