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
143
144
145
146
147
148
//! **A collection of COMPOSITE elements on MongoDB is a native SUBDOCUMENT ARRAY, and this backend
//! needed nothing to get one.**
//!
//! ```text
//! SQL take_stamps: (id, stamps_ordinal, stamps_secs, stamps_nanos) a second table
//! MongoDB { stamps: [ { secs: 10, nanos: 250 }, … ] } the document itself
//! ```
//!
//! # There is no strategy here, and a composite element does not create one
//!
//! The SQL family splits four ways over two questions this backend never asks — *can this dialect
//! keep a collection in a column* and *can this element type live in an array* — and a composite
//! element is the case where both answers finally diverge on the SQL side: an array of two columns is
//! not a thing any dialect has, so every one of them takes the edge table. MongoDB's answer does not
//! move, because the operand and the stored value are the same kind of value whatever that value is:
//! [`MongoCarrier`](crate::MongoCarrier) for the framework's own instant already returns a
//! `Bson::Document`, so an ARRAY of them is what `membership` builds with no widening at all.
//!
//! That is the whole finding, and it is worth a file rather than a sentence: the two kinds here take
//! `V: MongoCarrier` and nothing about a WIDTH, so what the SQL family needed a second comparison
//! type, a second scope and a bind ceiling for is on this backend a row that was already written.
//!
//! # The SEGMENT NAMES are the same ones the SQL columns are joined from
//!
//! `secs` and `nanos` are read off the instant's own module in both families — the SQL side joins
//! them under the field and this side nests them under it — so a rename moves `stamps_secs`,
//! `{ stamps: { secs } }` and the element scope's `value_secs` together. The sub-document is where
//! the `flatten` refusal's asymmetry shows: a family that FLATTENS a composite joins the names, and a
//! family that NESTS one does not.
//!
//! # An element whose OWN PART is composite needs nothing here either, and the census says why
//!
//! The SQL side widened for one: its edge table writes a column per LEAF, so a part that lends no
//! name splices its leaves into the element's own namespace and every party there had to descend.
//! This backend reads no width at all — the two kinds take `V: MongoCarrier` and nothing else — so a
//! nested element is whatever its own carrier row says one document is, and `DetectedLanguage`'s row
//! already writes the identity's four keys beside the confidence at ONE level, for exactly the reason
//! the SQL side joins those four without a prefix.
//!
//! What is missing for a `Vec<DetectedLanguage>` on this backend is therefore not the collection: it
//! is the ELEMENT's own comparison. There is no `MongoDetectedLanguageComparison` and no
//! `MongoLanguageIdComparison` — see that family's SQL crossing, whose `Db: sqlx::Database` bound is
//! written to leave room for one — so the `any` slot has nothing to hold. That is a family half
//! rather than a line, and it is recorded rather than started beside a naming fix.
use ;
use ;
use crate::;
const ROW: RecordAddress = new;
/// A sequence of instants, whose members are guarded by a scalar comparison over one segment.
type Sequence = ;
/// A set of them, likewise.
type Set = ;
/// One element is ONE sub-document, under the same two names the SQL columns are joined from.
/// **MEMBERSHIP is the bare sub-document match**, which is what implicit traversal already is — so a
/// composite element's containment needs no operator of its own here and no scope to ask it in.
/// **The whole ARRAY is the operand**, and it needs no encoding of its own: a list of composite
/// operands and a stored sub-document array are the same BSON value.
/// **The element's OWN comparison rides `$elemMatch`**, which is this backend's element scope — the
/// same slot the SQL family opens a derived table for, asking one question of one member.
/// A SET's own containment operators take the same array operand, so both SHAPES reach the
/// sub-document array without either naming a width.