Skip to main content

selene_core/feature_register/
annex_b.rs

1//! ISO Annex B implementation-defined identifier register.
2//!
3//! Split out of `feature_register.rs` to keep that file under the 700-LOC cap.
4//! `AnnexBId` and `ImplDefinedChoice` live here and are re-exported from the
5//! parent module so the public `feature_register::AnnexBId` path is preserved.
6
7/// ISO Annex B implementation-defined identifier.
8#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
9#[repr(transparent)]
10pub struct AnnexBId(&'static str);
11
12impl AnnexBId {
13    /// Return the ISO Annex B ID string, such as `IL001`.
14    pub const fn as_str(self) -> &'static str {
15        self.0
16    }
17}
18
19/// Chosen value for an implementation-defined element.
20#[derive(Clone, Copy, Debug, Eq, PartialEq)]
21pub struct ImplDefinedChoice {
22    /// Human-readable summary of selene-db's choice.
23    pub choice: &'static str,
24    /// Spec section that owns the detailed behavior.
25    pub settled_in: &'static str,
26}
27
28/// Canonical Annex B register entries settled by the current specs.
29pub const ANNEX_B_REGISTER: &[(AnnexBId, ImplDefinedChoice)] = &[
30    (
31        AnnexBId("IA001"),
32        ImplDefinedChoice {
33            choice: "f64 default; Float32 distinct; NaN total_cmp",
34            settled_in: "spec 02 section 3.1",
35        },
36    ),
37    (
38        AnnexBId("IA025"),
39        ImplDefinedChoice {
40            choice: "numeric ordering follows total_cmp for f32/f64",
41            settled_in: "spec 02 section 3.1",
42        },
43    ),
44    (
45        AnnexBId("ID001"),
46        ImplDefinedChoice {
47            choice: "caller-supplied principal bytes; opaque to selene-db",
48            settled_in: "spec 04 section 3.2",
49        },
50    ),
51    (
52        AnnexBId("ID016"),
53        ImplDefinedChoice {
54            choice: "en-US diagnostic text by default",
55            settled_in: "spec 09 section 5",
56        },
57    ),
58    (
59        AnnexBId("ID017"),
60        ImplDefinedChoice {
61            choice: "structured diagnostic map may carry selene provider fields",
62            settled_in: "spec 06 section 3.3",
63        },
64    ),
65    (
66        AnnexBId("ID028"),
67        ImplDefinedChoice {
68            choice: "i64 default; i128 if context demands",
69            settled_in: "spec 02 section 3.1",
70        },
71    ),
72    (
73        AnnexBId("ID034"),
74        ImplDefinedChoice {
75            choice: "28 significant digits via rust_decimal",
76            settled_in: "spec 02 section 3.1",
77        },
78    ),
79    (
80        AnnexBId("ID037"),
81        ImplDefinedChoice {
82            choice: "binary64 default; binary32 if context demands",
83            settled_in: "spec 02 section 3.1",
84        },
85    ),
86    (
87        AnnexBId("ID090"),
88        ImplDefinedChoice {
89            choice: "node terminology",
90            settled_in: "spec 02 section 3.1",
91        },
92    ),
93    (
94        AnnexBId("ID091"),
95        ImplDefinedChoice {
96            choice: "edge terminology",
97            settled_in: "spec 02 section 3.1",
98        },
99    ),
100    (
101        AnnexBId("IE001"),
102        ImplDefinedChoice {
103            choice: "auto-commit per statement; explicit START TRANSACTION for multi-statement",
104            settled_in: "spec 03 section 6.4",
105        },
106    ),
107    (
108        AnnexBId("IE002"),
109        ImplDefinedChoice {
110            choice: "serializable only",
111            settled_in: "spec 03 section 6.4",
112        },
113    ),
114    (
115        AnnexBId("IE004"),
116        ImplDefinedChoice {
117            choice: "no relaxation from serializable",
118            settled_in: "spec 03 section 6.4",
119        },
120    ),
121    (
122        AnnexBId("IE006"),
123        ImplDefinedChoice {
124            choice: "catalog statements inside data transactions are rejected",
125            settled_in: "spec 03 section 6.4",
126        },
127    ),
128    (
129        AnnexBId("IE007"),
130        ImplDefinedChoice {
131            choice: "data mutations inside catalog transactions are rejected",
132            settled_in: "spec 03 section 6.4",
133        },
134    ),
135    (
136        AnnexBId("IL001"),
137        ImplDefinedChoice {
138            choice: "node labels min 0; edge labels exactly 1",
139            settled_in: "spec 02 section 3.1",
140        },
141    ),
142    (
143        AnnexBId("IL013"),
144        ImplDefinedChoice {
145            choice: "stored inline strings capped at 2^32 - 1 bytes; session-configurable character and byte-string result caps default to 2^32 - 1",
146            settled_in: "spec 02 section 3.1",
147        },
148    ),
149    (
150        AnnexBId("IL015"),
151        ImplDefinedChoice {
152            choice: "stored property maps capped at 2^32 - 1 entries; session-configurable list and path result caps default to 1,000,000 list elements and 32 path edges",
153            settled_in: "spec 02 section 3.1",
154        },
155    ),
156    (
157        AnnexBId("IL018"),
158        ImplDefinedChoice {
159            choice: "path quantifier upper bound 100",
160            settled_in: "spec 08 section 9",
161        },
162    ),
163    (
164        AnnexBId("IL020"),
165        ImplDefinedChoice {
166            choice: "flat catalog, nesting depth 0",
167            settled_in: "spec 09 section 5",
168        },
169    ),
170    (
171        AnnexBId("IL024"),
172        ImplDefinedChoice {
173            choice: "nanosecond temporal precision",
174            settled_in: "spec 02 section 3.1",
175        },
176    ),
177    (
178        AnnexBId("IS001"),
179        ImplDefinedChoice {
180            choice: "caller-bounded session scope",
181            settled_in: "spec 08 section 9",
182        },
183    ),
184    (
185        AnnexBId("IV001-IV016"),
186        ImplDefinedChoice {
187            choice: "Value enum closed substitution union",
188            settled_in: "spec 02 section 3",
189        },
190    ),
191    (
192        AnnexBId("IV011"),
193        ImplDefinedChoice {
194            choice: "Value minus RecordTyped; Value::Vector is native dense f32; Value::Json is native RFC 8259 JSON; Value::Extended carries opaque sister-project payloads",
195            settled_in: "spec 02 section 3.1",
196        },
197    ),
198    (
199        AnnexBId("IW001"),
200        ImplDefinedChoice {
201            choice: "caller responsibility per D1",
202            settled_in: "spec 01 section 4",
203        },
204    ),
205    (
206        AnnexBId("IW002"),
207        ImplDefinedChoice {
208            choice: "caller responsibility per D1",
209            settled_in: "spec 01 section 4",
210        },
211    ),
212    (
213        AnnexBId("IW007"),
214        ImplDefinedChoice {
215            choice: "raw code plus structured fields; miette for terminals",
216            settled_in: "spec 09 section 6",
217        },
218    ),
219    (
220        AnnexBId("IW010"),
221        ImplDefinedChoice {
222            choice: "single frozen native BuiltinProcedureRegistry; no loadable extensions",
223            settled_in: "spec 08",
224        },
225    ),
226    (
227        AnnexBId("IW014"),
228        ImplDefinedChoice {
229            choice: "byte-exact comparison only",
230            settled_in: "spec 08 section 9",
231        },
232    ),
233    (
234        AnnexBId("IW015"),
235        ImplDefinedChoice {
236            choice: "no automatic directory/schema creation",
237            settled_in: "spec 09 section 5",
238        },
239    ),
240    (
241        AnnexBId("IW016"),
242        ImplDefinedChoice {
243            choice: "no automatic directory/schema creation",
244            settled_in: "spec 09 section 5",
245        },
246    ),
247    (
248        AnnexBId("IW025"),
249        ImplDefinedChoice {
250            choice: "catalog-modifying procedures are transactional via Mutator::commit",
251            settled_in: "spec 09 section 5",
252        },
253    ),
254    (
255        AnnexBId("ID048"),
256        ImplDefinedChoice {
257            choice: "default session time zone displacement is UTC (+00:00); SESSION RESET TIME ZONE restores it",
258            settled_in: "ISO section 4.5.2.2 / section 7.2 GR3",
259        },
260    ),
261    (
262        AnnexBId("ID049"),
263        ImplDefinedChoice {
264            choice: "default session parameters are the empty set; no impl-defined `_`-prefixed parameters are pre-bound",
265            settled_in: "ISO section 4.5.2.2 / section 7.2 GR4-5",
266        },
267    ),
268];