1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Application-level schema definitions for models, fields, relations, and indices.
//!
//! This module contains the types that represent a Toasty schema from the
//! application's perspective: models with named fields, relationships between
//! models, primary keys, indices, and constraints. This is the layer that Rust
//! code interacts with; the separate [`super::db`] module represents the
//! physical database schema (tables, columns), and [`super::mapping`] bridges
//! the two.
//!
//! # Key types
//!
//! - [`Schema`] -- the top-level container holding all registered models.
//! - [`Model`] -- a single model, which can be a [`ModelRoot`] (backed by a
//! database table), an [`EmbeddedStruct`], or an [`EmbeddedEnum`].
//! - [`Field`] -- one field on a model, identified by a [`FieldId`].
//! - [`BelongsTo`], [`HasMany`], [`HasOne`] -- relation types.
//! - [`Index`] -- a secondary index on a model's fields.
//! - [`PrimaryKey`] -- a model's primary key definition.
//!
//! # Examples
//!
//! ```ignore
//! use toasty_core::schema::app::Schema;
//!
//! // Schemas are typically constructed via the derive macro or `Schema::from_macro`.
//! let schema = Schema::default();
//! assert_eq!(schema.models().count(), 0);
//! ```
pub use Arg;
pub use ;
pub use ;
pub use Embedded;
pub use ;
pub use ;
pub use ;
pub use ;
pub use PrimaryKey;
pub use ;
pub use ;
use Name;