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 external;
9pub mod keys;
10pub mod migrations;
11pub mod planner;
12pub mod procedure;
13pub mod query;
14pub mod schema;
15pub mod trigger;
16pub mod validation;
17
18pub use check::{
19    eval_check, parse_check, CheckExpression, CheckOperand, CheckOperator, CheckParseError,
20};
21pub use external::{quote_ident, ViewSpec, VirtualTableSpec};
22pub use keys::{
23    decode_pk, encode_component, encode_pk, encode_row_guard_key, encode_unique_key, KeyComponent,
24    KIT_KEY_VERSION,
25};
26pub use migrations::{migration_checksum, plan_migrations, Migration, MigrationOp};
27pub use planner::{
28    plan_delete, DeletePlan, PlannerError, RestrictedConstraint, RowRef, SetNullUpdate,
29};
30pub use procedure::ProcedureSpec;
31pub use query::{
32    AggFunc, Aggregate, AggregateQuery, Cte, Delete, Direction, Expr, Insert, Join, JoinKind,
33    JoinQuery, Literal, OnConflict, OrderBy, Query, Select, Update, Upsert,
34};
35pub use schema::{
36    CheckConstraint, Column, ColumnType, DefaultKind, ForeignKey, ForeignKeyAction, Index,
37    IndexKind, Schema, SchemaError, Sequence, Table, UniqueConstraint,
38};
39pub use trigger::TriggerSpec;
40pub use validation::{validate_row, validate_row_kit_only, ValidationError};