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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
//! The reading → LEAF VALUE map: [`ToOrderLeaves`], the ONE spelling an emitted cursor slot is
//! minted through.
//!
//! [`ToDatabaseOrderBy`](super::ToDatabaseOrderBy) says which leaves a term sorts by. This says what
//! ONE of those leaves is worth — the Rust type a level's boundary value has, and how to read it off
//! the row's own field. The two are the halves of one expansion: a term over a reordering citizen
//! becomes one ordinary level per leaf, and each level's cursor slot holds one leaf's value.
//!
//! # It is the SELECTOR, and the vocabulary it selects is the citizen's
//!
//! What a composite's leaves ARE is stated by the composite, at
//! [`OrderLeaves`](crate::OrderLeaves), beside the [`SEGMENTS`](crate::ColumnKind::SEGMENTS) and the
//! [`ORDER`](crate::ColumnKind::ORDER) it already writes. This module holds no citizen's answer and
//! grows no row per citizen. What it is FOR is the thing a macro cannot do: `at: MediaTimestamp` and
//! `title: String` are the same tokens, so an emission asked which of them has leaves would be
//! guessing. It writes one uniform spelling per column —
//! `<<T as DefaultMarker>::Marker as ToOrderLeaves>::Leaf` — and the compiler selects. A scalar's
//! row answers with the scalar itself, so a scalar column's cursor slot is exactly the type it was
//! before this map existed and its bytes do not move.
//!
//! That is [`shape`](crate::shape)'s arrangement carried one seam further: the same trick that lets
//! `ColumnKind` answer *how many columns* without the emitter deciding, answering *what one of them
//! is worth*.
//!
//! # `Db` is absent, and that is a measurement rather than a simplification
//!
//! [`ToDatabaseOrderBy`](super::ToDatabaseOrderBy) carries the dialect because what a database sorts
//! by is a database's answer. A LEAF's Rust type is not: `pts` is an `i64` in every dialect, the
//! type being the citizen's own. Carrying a parameter nothing reads would put a projection at a
//! generic `Db` on every `where` clause that names this — the four bound walls
//! [`ToCrossedComparison`](crate::comparison::ToCrossedComparison) documents — for an answer that
//! could not vary. What IS per-dialect about a leaf is how it BINDS, and that is
//! [`Carrier<Db>`](crate::Carrier)'s, on the leaf's own type, unchanged.
//!
//! # The COLLECTION readings have no row, and the absence is the design
//!
//! A collection is ONE column of the row whatever it holds, and its boundary is not a leaf of
//! anything: an array-stored one resumes at the whole LIST and a mirrored one at its companion
//! column's own bytes. Both are named directly by the emission, which reaches them through branches
//! it already writes — a collection is a fact a DECLARATION states, so unlike a width it is
//! something a macro can see. A row here would be a second way to spell a boundary that already has
//! one.
use crate::;
/// An INTERPRETATION mapped to the VALUE one of its order LEVELS compares.
///
/// Implemented for the markers in [`crate::marker`] and for nothing else — the keying
/// [`ToDatabaseOrderBy`](super::ToDatabaseOrderBy) and
/// [`ToGraphqlFilter`](crate::ToGraphqlFilter) both take, for their reason: a type does not
/// determine its own reading. A declaration reaches this through
/// [`DefaultMarker`](crate::DefaultMarker).
///
/// # Every FLAT reading answers with ITSELF, and that is what keeps a scalar's cursor unmoved
///
/// One column, one leaf, and the leaf is the value: a scalar level's boundary is the scalar. So the
/// projection resolves to the very type the slot was minted with before this map existed, and every
/// byte of every scalar cursor is what it was.
///
/// # `Clone` is what a BOUNDARY costs, and it is not new
///
/// A cursor slot OWNS its value — it outlives the row it was read from and is handed back by a
/// client afterwards — so reading one off a borrowed field is a clone wherever it happens. The
/// emitted `value` already cloned at exactly this point; the bound states what that call was already
/// paying.
/// The seven FLAT readings, each answering with the value it is a reading of.
///
/// A macro rather than seven copies, for [`scalar_columns`](crate::column)'s reason one axis over:
/// the rows are identical and what differs is the marker's name, so a list is the honest shape and a
/// reading added to the flat family joins by being named here.
flat_leaves!
use crateFlagsMarker;
flat_leaves!
/// The ONE reading whose levels can be narrower than its value, delegating to the citizen's own
/// published vocabulary.
///
/// It reads [`OrderLeaves`] rather than holding a table of citizens, which is the framework-open
/// half of this design and the same half [`ToDatabaseOrderBy`](super::ToDatabaseOrderBy) takes for
/// the sequence: what a composite's leaves are worth is the composite's, so a downstream citizen
/// joins by writing one impl beside the [`ColumnKind`](crate::ColumnKind) it already writes.