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
use crate::;
/// The serialization format used to store a field value in the database.
///
/// When a field's in-memory type does not map directly to a database column
/// type, the value is serialized into a format the database can store (e.g.,
/// a JSON string column).
///
/// # Examples
///
/// ```
/// use toasty_core::schema::app::SerializeFormat;
///
/// let fmt = SerializeFormat::Json;
/// ```
/// A primitive (non-relation, non-embedded) field type.
///
/// Primitive fields map directly to a single database column. They carry the
/// application-level type, an optional storage-type hint for the database
/// driver, and an optional serialization format.
///
/// # Examples
///
/// ```
/// use toasty_core::schema::app::FieldPrimitive;
/// use toasty_core::stmt::Type;
///
/// let prim = FieldPrimitive {
/// ty: Type::String,
/// storage_ty: None,
/// serialize: None,
/// };
/// ```