utopia_database/lib.rs
1//! A document database: collections with typed attributes and indexes,
2//! documents with permissions, queries, relationships, tenancy and caching,
3//! over pluggable storage adapters.
4//!
5//! The crate reads and writes the same tables, rows and metadata as
6//! `utopia-php/database`, so PHP and Rust services share one dataset.
7//!
8//! # Port status
9//!
10//! Only the modules without I/O are here so far: identifiers, roles,
11//! permissions, dates and the errors they fail with. The rest of the crate
12//! (the model, the adapters, the validators and the [`Error`] marks they
13//! set) comes from appwrite/appwrite#14308.
14//!
15//! # PHP classes and their Rust items
16//!
17//! | PHP | Rust |
18//! |---|---|
19//! | `Utopia\Database\Id` | [`id`] |
20//! | `Utopia\Database\Role` | [`Role`] |
21//! | `Utopia\Database\Permission`, `PermissionType` | [`Permission`], [`PermissionType`] |
22//! | `Utopia\Database\DateTime` | [`datetime`] |
23//! | `Utopia\Database\Exception` and `Exception\*` | [`Error`], [`Kind`] |
24
25#![warn(missing_docs)]
26
27pub mod datetime;
28// The marks are set and read by the modules that are not here yet.
29#[allow(dead_code)]
30pub mod error;
31pub mod id;
32pub mod permission;
33pub mod role;
34
35pub use error::{Error, Kind, Result};
36pub use permission::{Permission, PermissionType};
37pub use role::Role;