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
//! WHAT THE `indexed` WORD EMITS — the builder appended to a collection's edge table, and the two
//! shapes that get nothing.
//!
//! A suite of its own beside [`super::sortable_tests`], for that suite's reason: what is asserted
//! here is ONE word's emission, and a build that never wrote it getting back exactly the tokens it
//! got before the word existed.
//!
//! # The three rows, which are the ruling read off the emission
//!
//! | dialect | the collection lives | what the word emits |
//! |---|---|---|
//! | SQLite, MySQL | an edge table, always | `EdgeTable::new(…).indexed()` — the second index, and SQLite's collation with it |
//! | PostgreSQL, no `edge` word | a native array on the row | NOTHING, and not for the word's sake: a record whose collection rides an array gets NO blueprint at all |
//!
//! The PostgreSQL row is worth reading carefully, because it is not `sortable`'s. There the word
//! genuinely has nothing to buy — a native array orders itself. Here it has something real to buy,
//! and the reason nothing is emitted is one that predates this word: `Vec<T>` has no `StoredAs` row,
//! so `RecordModel::describable` subtracts the database and there is no `Table` to write a list
//! onto. The framework's side of the array half is written and tested —
//! `ingraph`'s `Table::with_collection_indexes` — and the day that wall comes down is the day this
//! row changes.
use crate::;
/// The same model with its collection carrying the ACCESS word — `indexed`, the field's own fact
/// beside its label rather than inside it, exactly as [`sortable`](super::sortable_tests) is.
/// The emission's tokens as text, GATES AND ALL — the road every suite beside this one reads by.
/// **THE EDGE TABLE CARRIES THE BUILDER**, which is the whole of what the emitter owes the word: the
/// descriptor states the intent and `ingraph`'s own DDL lane renders the statements from it.
/// **MYSQL ANSWERS THE SAME**, being the other dialect with no array type — so the row is the
/// STORAGE FORM's rather than one dialect's, which is what `seeks_by_value` reads.
/// **A COLLECTION THAT NEVER WROTE THE WORD KEEPS ITS ABSENCE**, and this is the assertion the
/// word's opt-in promise rests on: the same model one field apart emits the constructor it always
/// emitted, so a schema pays for the second index only where a declaration asked for one.
/// **AN ARRAY-STORED COLLECTION EMITS NOTHING, AND THE BLUEPRINT IS WHY.** Postgres's wordless
/// default rides the row as a native array, and a record carrying one gets no `Describe` impl at
/// all — so there is no descriptor for either half of this word to be written onto.
///
/// Asserted at the BLUEPRINT rather than at the word, because that is the fact: a test that only
/// looked for `.indexed()` would pass for a build that had started emitting a schema and forgotten
/// the word in it.