ingraph-codegen 0.1.0

The emission engine behind ingraph-derive: a plain declaration model in, the ingraph framework faces out.
Documentation
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
//! The interface's OWN projection: the discriminant vocabulary, the two addresses over it, and one
//! row per SQL database the declaration is about.
//!
//! # An interface has a row, and it is not any member's
//!
//! A member's row is that member's whole table — every column it stores, at the names and types its
//! own declaration gave them. What a union statement hands back is narrower and wider at once: the
//! SHARED columns, under the INTERFACE's names, plus a discriminant saying which member the row came
//! from. Neither of those is a shape a member's row has, so the interface declares its own.
//!
//! ```text
//! SELECT "title" AS "title", "flags" AS "mask", 'audio' AS "__kind" FROM "audio"
//!                            ^^^^^^^^^^^^^^^^^                      ^^^^^^^^^^^
//!                            the member's column, promised          the discriminant
//!                            under the interface's name             this arm projects
//! ```
//!
//! # The stored TYPE is the interface's pin, and the ROW is where that pin is spent
//!
//! I-1 already discharges every pin at the member's own row —
//! [`equations`](super::equations) writes `fn _audio_sqlite_mask(row: &…) -> &BeU64`, which is
//! `E0308` when a member stores the column at something else. So by the time this projection
//! decodes, every member's column really is one type per database, and the interface's row can carry
//! ONE field for it. The pin and the row are two readings of one fact, through
//! [`InterfaceField::pinned`](super::InterfaceField::pinned) at both.
//!
//! # SQL only, and mongo's absence is a round rather than an omission
//!
//! A union of SELECTs is the SQL family's statement. MongoDB's answer is `$unionWith`, whose
//! projection stage, whose discriminant and whose cursor are a different shape end to end — so a
//! `mongo` in an interface's `persist(…)` selects it for the ROW EQUATIONS, which are family-neutral,
//! and no row is written for it.
//!
//! # The DISCRIMINANT's name is FENCED, and the declaration may move the fence
//!
//! `__ig_kind__` is a name `ingraph-derive` refuses a declared column for — *a name with `__` at
//! both ends is reserved* — so a declaration promising a shared field called `kind` collides with
//! nothing. `persist(<db>(alias(prefix = "__mine")))` moves the whole family to `__mine_kind__`, for
//! a deployment whose schema already holds real tables inside the default namespace, and the fence
//! follows it. The Rust field wears whichever it is as well as the SQL column, because the two are
//! one name: what a decode reads by string and what the struct holds are the same slot, and
//! spelling them differently would be the one place a reader had to hold a mapping.
//!
//! # The ADDRESS is a SUM, and that is what lets one projection carry either member's
//!
//! A union's total order ends `…, __ig_kind__, id`, so every arm projects its member's address
//! column — and the members need not agree about what an id IS. `<I>Id` is the sum over
//! `<M as Identifiable>::Id`, one variant per member, reached through the family projection and
//! never through a name this crate builds. A `Video` keyed by an integer beside an `Audio` keyed by
//! text is one interface, and neither has to be widened to the other.
//!
//! The DISCRIMINANT is what decides which variant, which is why the decode reads it FIRST: the
//! per-kind branch has exactly one home, and `<I>Id::kind` is the same fact read back — so a row
//! whose discriminant and whose address disagree is a value nobody can build.
//!
//! # The KEY is that sum one associated type over, and nothing decodes it
//!
//! `<I>Key` is `<M as Transformer>::Key` per member, beside the address and reached the same way.
//! The two are the ENTITY BINDING's own decomposition, read at the interface: a row is REACHED by
//! an id, and a hit is HANDED BACK under a key — so a union's projection carries the first, and the
//! second is what a search crossing the members answers with.
//!
//! It gets no `FromRow` for exactly that reason. Nothing decodes a key out of a union row: the
//! statement selects the address column, the cursor freezes the address, and hydration eats
//! addresses. A decode here would be machinery for a row shape no arm projects.
//!
//! It is minted BY RULING rather than by a consumer, which is this framework's standing rule
//! suspended on purpose: the name and the shape are the fusion seam's PREMISE — the vocabulary that
//! seam is designed against — and a premise settled when its consumer lands is a premise settled
//! twice. It rides the projection's own gate all the same, because `kind` names the discriminant
//! and the discriminant is the projection's: an interface with nothing to select mints no
//! vocabulary for a key to answer with.

use quote::{format_ident, quote};

use crate::{
  emit::{leading, parameter},
  interface::InterfaceModel,
  model::DatabaseKind,
  union,
};

/// What the row's ADDRESS field and its accessor are called.
///
/// UNFENCED, because the value is not the framework's invention: each arm selects that member's own
/// address column, and the union needs one output name for columns two members spell differently.
/// A shared field called `id` collides with it, which is two columns of one name colliding as they
/// do anywhere.
const ID_FIELD: &str = "id";

impl InterfaceModel {
  /// The SQL databases this interface has a projection row in: the ones its declaration is about,
  /// less the document family.
  ///
  /// Asked of [`databases`](InterfaceModel::databases) rather than of `persist` alone, so the
  /// selection block and a field's own pin are joined once — see that method for why neither is a
  /// refinement of the other.
  pub(crate) fn sql_databases(&self) -> Vec<DatabaseKind> {
    self
      .databases()
      .into_iter()
      .filter(|kind| kind.is_sql())
      .collect()
  }

  /// Whether a PROJECTION can be written at all: the declaration is about a SQL database, and it
  /// promises at least one stored column.
  ///
  /// Both halves are conditions rather than refusals, exactly as
  /// [`RecordModel::queryable`](crate::model::RecordModel::queryable)'s are: an interface whose
  /// fields are all computed promises nothing a statement could select, and one about no SQL
  /// database has no statement to select it into. Neither is a mistake — a contract over derived
  /// values is a real declaration — so what is missing is the emission and never a diagnostic.
  ///
  /// [`Self::stored`] and not [`Self::projected`], which is narrower: an interface promising ONE
  /// collection column has a filter to write, an order to complete and a page to serve — the union
  /// selects the discriminant and the address whatever the shared columns are — so a projection with
  /// no shared column of its own is a real emission rather than an absent one.
  pub(crate) fn projects(&self) -> bool {
    !self.sql_databases().is_empty() && self.stored().next().is_some()
  }

  /// The discriminant vocabulary, the two addresses over it, and the per-database rows.
  pub(crate) fn projection(&self) -> proc_macro2::TokenStream {
    if !self.projects() {
      return quote!();
    }
    let kind = self.kind_vocabulary();
    let address = self.address_sum();
    let key = self.key_sum();
    let rows = self
      .sql_databases()
      .into_iter()
      .map(|database| self.row(database));
    quote! {
      #kind
      #address
      #key
      #(#rows)*
    }
  }

  /// `<I>Id` — the sum over the members' own ids, and the discriminant it answers with.
  ///
  /// The payload is `<M as Identifiable>::Id` through the family projection, never a name this crate
  /// builds: an id's type is the member's declaration's, and a convention-built one would be a second
  /// spelling of something that declaration can move. [`Identifiable`] rather than the entity
  /// binding, because the id is the whole of what the variant spends — the same smaller bound the
  /// `ref` equation takes, so a member without one is refused naming the capability that failed.
  ///
  /// `kind` is `const`, and it is the crossing that makes the pair coherent BY CONSTRUCTION: a row
  /// carries one discriminant and one address, and reading the second back gives the first.
  fn address_sum(&self) -> proc_macro2::TokenStream {
    let vis = &self.vis;
    let interface = &self.name;
    let name = super::default_id_name(interface);
    let vocabulary = super::default_kind_name(interface);
    let identifiable = self.framework(&["transform"], "Identifiable");

    let variants = self.members.iter().map(|member| {
      let variant = &member.ident;
      let ty = &member.ty;
      let doc = leading(&format!(
        "A row of [`{}`]'s table, at that member's own id.",
        quote!(#ty)
      ));
      quote! {
        #[doc = #doc]
        #variant(<#ty as #identifiable>::Id),
      }
    });
    let kinds = self.members.iter().map(|member| {
      let variant = &member.ident;
      quote!(Self::#variant(_) => #vocabulary::#variant,)
    });

    let doc = leading(&format!(
      "The ADDRESS of one row of [`{interface}`] — which member, and that member's own id.\n\nA        SUM rather than one type, because the members need not agree about what an id IS: a member        keyed by an integer and one keyed by text are one interface, and neither has to be widened        to the other."
    ));
    let kind_doc = leading(
      "Which member this address is of.\n\nThe same fact the row's discriminant column carries,        read back off the address — so the pair cannot disagree.",
    );
    quote! {
      #[doc = #doc]
      #[derive(::core::fmt::Debug, ::core::clone::Clone, ::core::cmp::PartialEq)]
      #vis enum #name {
        #(#variants)*
      }

      impl #name {
        #[doc = #kind_doc]
        #[inline]
        #[must_use]
        #vis const fn kind(&self) -> #vocabulary {
          match self {
            #(#kinds)*
          }
        }
      }
    }
  }

  /// `<I>Key` — the sum over the members' own whole keys, and the discriminant it answers with.
  ///
  /// [`address_sum`](Self::address_sum) one associated type over, and every argument that shape
  /// rests on is that method's: the payload is a family projection rather than a name this crate
  /// builds, the members need not agree about what a key IS, and `kind` is what keeps the pair
  /// coherent by construction.
  ///
  /// What differs is the CAPABILITY. [`Transformer`] rather than [`Identifiable`], because that is
  /// where a key is named — an id is the supertrait's and a key is the entity binding's member — so
  /// the smaller bound is not available to take and a member with no binding is refused naming the
  /// trait that failed.
  ///
  /// The derive list is the address sum's, and it is the whole of what this expansion asks of a type
  /// `Transformer::Key` deliberately leaves unbound. A wider one would be a demand nothing here
  /// spends.
  fn key_sum(&self) -> proc_macro2::TokenStream {
    let vis = &self.vis;
    let interface = &self.name;
    let name = super::default_key_name(interface);
    let vocabulary = super::default_kind_name(interface);
    let transformer = self.framework(&["transform"], "Transformer");

    let variants = self.members.iter().map(|member| {
      let variant = &member.ident;
      let ty = &member.ty;
      let doc = leading(&format!(
        "A hit on [`{}`], at that member's own whole key.",
        quote!(#ty)
      ));
      quote! {
        #[doc = #doc]
        #variant(<#ty as #transformer>::Key),
      }
    });
    let kinds = self.members.iter().map(|member| {
      let variant = &member.ident;
      quote!(Self::#variant(_) => #vocabulary::#variant,)
    });

    let doc = leading(&format!(
      "The KEY of one hit of [`{interface}`] — which member, and that member's own whole key.\n\n\
       The address one associated type over, and the two are the entity binding's own \
       decomposition read here: a row is REACHED by an id, which the projection carries, and a hit \
       is HANDED BACK under a key, which is this. What will answer with it is a search that crosses \
       the members, so nothing decodes one out of a row and nothing spends one yet. It is minted \
       now because it is that search's premise, and a premise settled when its consumer lands is a \
       premise settled twice."
    ));
    let kind_doc = leading(
      "Which member this key is of.\n\nThe same fact the address answers about a row, read off the \
       key instead — so a hit's two halves cannot name different members.",
    );
    quote! {
      #[doc = #doc]
      #[derive(::core::fmt::Debug, ::core::clone::Clone, ::core::cmp::PartialEq)]
      #vis enum #name {
        #(#variants)*
      }

      impl #name {
        #[doc = #kind_doc]
        #[inline]
        #[must_use]
        #vis const fn kind(&self) -> #vocabulary {
          match self {
            #(#kinds)*
          }
        }
      }
    }
  }

  /// `<I>Kind` — a unit enum over the members, and the capability that reads it both ways.
  ///
  /// # The WORD is the variant's, snake-cased, and never a member's table
  ///
  /// The framework's `InterfaceKind` states the argument in full, and what it comes to is that the
  /// discriminant is a SORT KEY: a member's table is per database and renameable, so a total order
  /// ending in one would re-sort every page when a deployment moved a table. The variant is the
  /// interface's own word and nothing about storage can move it.
  ///
  /// It is [`union::word`]'s snake case rather than the variant verbatim, which is the same
  /// resolver every member-named identifier in this expansion goes through — so `is_video`, the
  /// equations' `_video_sqlite_mask` and this word are one spelling of one member.
  fn kind_vocabulary(&self) -> proc_macro2::TokenStream {
    let vis = &self.vis;
    let interface = &self.name;
    let name = super::default_kind_name(interface);
    let capability = self.framework(&["interface"], "InterfaceKind");

    let variants = self.members.iter().map(|member| {
      let variant = &member.ident;
      let ty = &member.ty;
      let doc = leading(&format!("A row read out of [`{}`]'s table.", quote!(#ty)));
      quote! {
        #[doc = #doc]
        #variant,
      }
    });
    let all = self.members.iter().map(|member| {
      let variant = &member.ident;
      quote!(Self::#variant,)
    });
    let words = self.members.iter().map(|member| {
      let variant = &member.ident;
      let word = union::word(&member.ident).to_string();
      quote!(Self::#variant => #word,)
    });
    let interface_name = interface.to_string();

    let doc = leading(&format!(
      "Which member of [`{interface}`] a row came from.\n\nOne variant per member, carrying \
       nothing: what a discriminant answers is WHICH, and the row beside it carries the columns. \
       Its ordering is deliberately absent — the statement sorts by the projected WORD, so the \
       comparison every party makes goes through `as_str` rather than through a derive that would \
       run in declaration order."
    ));
    let as_str_doc = leading("The word this member's arm projects, and the word a cursor freezes.");
    quote! {
      #[doc = #doc]
      #[derive(
        ::core::fmt::Debug,
        ::core::clone::Clone,
        ::core::marker::Copy,
        ::core::cmp::PartialEq,
        ::core::cmp::Eq,
        ::core::hash::Hash
      )]
      #vis enum #name {
        #(#variants)*
      }

      #[automatically_derived]
      impl #capability for #name {
        const INTERFACE: &'static ::core::primitive::str = #interface_name;
        const ALL: &'static [Self] = &[#(#all)*];

        #[doc = #as_str_doc]
        #[inline]
        fn as_str(self) -> &'static ::core::primitive::str {
          match self {
            #(#words)*
          }
        }
      }
    }
  }

  /// `<I><Db>Row` — the shared columns at their pinned types, and the member each row came from.
  ///
  /// # The fields are PRIVATE and the accessors hand back the STORED form
  ///
  /// A row is what a decode fills, so its fields are the decode's — the same locality a record's
  /// own rows keep. What an accessor hands back is a BORROW at every field, `copy` claim or not:
  /// the claim is about the field's DOMAIN type, and a database that pins another type for it is
  /// answering a different question. A caller wanting the domain value crosses the member's own
  /// conversion, which is where the pin was declared to be crossed.
  fn row(&self, kind: DatabaseKind) -> proc_macro2::TokenStream {
    let vis = &self.vis;
    let interface = &self.name;
    let name = super::default_row_name(interface, kind);
    let vocabulary = super::default_kind_name(interface);
    let address = super::default_id_name(interface);
    let discriminant = format_ident!("{}", self.kind_word(kind));
    let id = format_ident!("{ID_FIELD}");

    let fields = self.projected().map(|field| {
      let column = &field.name;
      let ty = field.pinned(kind);
      quote!(#column: #ty,)
    });
    let accessors = self.projected().map(|field| {
      let column = &field.name;
      let ty = field.pinned(kind);
      let doc = leading(&format!(
        "The `{column}` column, in the form this database stores it."
      ));
      quote! {
        #[doc = #doc]
        #[inline]
        #[must_use]
        #vis const fn #column(&self) -> &#ty {
          &self.#column
        }
      }
    });

    let what = what(kind);
    let doc = leading(&format!(
      "The {what} projection every member of [`{interface}`] is read INTO.\n\nThe interface's own \
       row: one field per shared column, at the type this database pins it to, and the member the \
       row came from. It is not any member's row — a member's row is that member's whole table, \
       where this is the promise the interface made over all of them."
    ));
    let kind_doc = leading("Which member this row came from.");
    let id_doc = leading(
      "This row's ADDRESS — the member it came from, at that member's own id. Borrowed, because a \
       member's id need not be `Copy`: the sum is as cheap to hand back as its widest variant and no \
       cheaper.",
    );
    let decode = self.decode(kind);
    quote! {
      #[doc = #doc]
      #[derive(::core::fmt::Debug, ::core::clone::Clone, ::core::cmp::PartialEq)]
      #vis struct #name {
        #discriminant: #vocabulary,
        #id: #address,
        #(#fields)*
      }

      impl #name {
        #[doc = #kind_doc]
        #[inline]
        #[must_use]
        #vis const fn #discriminant(&self) -> #vocabulary {
          self.#discriminant
        }

        #[doc = #id_doc]
        #[inline]
        #[must_use]
        #vis const fn #id(&self) -> &#address {
          &self.#id
        }

        #(#accessors)*
      }

      #decode
    }
  }

  /// The `FromRow` impl `#[derive(sqlx::FromRow)]` would have written — see
  /// [`crate::emit::sql`](crate::emit)'s own note for why the derive cannot be shelved and what
  /// writing it costs.
  ///
  /// The same shape a record's row takes, with one read the record's has no counterpart for: the
  /// DISCRIMINANT arrives as text under the engine's own alias and crosses into the vocabulary here.
  /// A word naming no member is `ColumnDecode` at that alias, carrying the framework's own sentence
  /// — which is the honest report, a discriminant nobody declared meaning the statement read a table
  /// this union does not join.
  fn decode(&self, kind: DatabaseKind) -> proc_macro2::TokenStream {
    let interface = &self.name;
    let name = super::default_row_name(interface, kind);
    let vocabulary = super::default_kind_name(interface);
    let address = super::default_id_name(interface);
    let discriminant = format_ident!("{}", self.kind_word(kind));
    let id = format_ident!("{ID_FIELD}");

    let from_row = self.framework(&["sqlx"], "FromRow");
    let row_trait = self.framework(&["sqlx"], "Row");
    let column_index = self.framework(&["sqlx"], "ColumnIndex");
    let decode = self.framework(&["sqlx"], "Decode");
    let column_type = self.framework(&["sqlx"], "Type");
    let result = self.framework(&["sqlx"], "Result");
    let sqlx_error = self.framework(&["sqlx"], "Error");
    let capability = self.framework(&["interface"], "InterfaceKind");
    let identifiable = self.framework(&["transform"], "Identifiable");
    // The WORD rather than the framework's const, because this impl is ungated and the binding that
    // states the word names a concrete backend. Both come off `kind_word`, so the arm that writes
    // the column and the decode that reads it are still one resolution rather than two.
    let alias = self.kind_word(kind);
    let id_alias = self.framework(&["interface"], "ID");

    // The row parameter is NAMED for the reason every emitted parameter is: a bare `R` shadows a
    // declaration's own type of that name inside this impl.
    let row_parameter = parameter("ROW");
    let bounds = self.projected().flat_map(|field| {
      let ty = field.pinned(kind);
      [
        quote!(#ty: #decode<'a, #row_parameter::Database>),
        quote!(#ty: #column_type<#row_parameter::Database>),
      ]
    });
    // What the ADDRESS costs, one member at a time and stated as an obligation: a member whose id
    // this dialect cannot decode makes the whole projection unreadable AT THE CALL rather than
    // inside the expansion, which is where the declaration can answer it.
    let addresses = self.members.iter().flat_map(|member| {
      let ty = &member.ty;
      [
        quote!(<#ty as #identifiable>::Id: #decode<'a, #row_parameter::Database>),
        quote!(<#ty as #identifiable>::Id: #column_type<#row_parameter::Database>),
      ]
    });
    let raised = self.members.iter().map(|member| {
      let variant = &member.ident;
      quote!(#vocabulary::#variant => #address::#variant(__row.try_get(__ingraph_id)?),)
    });
    let reads = self.projected().map(|field| {
      let column = &field.name;
      let ty = field.pinned(kind);
      let external = field.name.to_string();
      quote!(let #column: #ty = __row.try_get(#external)?;)
    });
    let fields = self.projected().map(|field| &field.name);

    let doc = leading(&format!(
      "Read a [`{name}`] back out of a union's row, each column under the INTERFACE's own name."
    ));
    quote! {
      #[automatically_derived]
      impl<'a, #row_parameter: #row_trait> #from_row<'a, #row_parameter> for #name
      where
        &'a ::core::primitive::str: #column_index<#row_parameter>,
        ::std::string::String: #decode<'a, #row_parameter::Database>
          + #column_type<#row_parameter::Database>,
        #(#bounds,)*
        #(#addresses,)*
      {
        #[doc = #doc]
        fn from_row(__row: &'a #row_parameter) -> #result<Self> {
          let __ingraph_alias: &::core::primitive::str = #alias;
          let __ingraph_kind: ::std::string::String = __row.try_get(__ingraph_alias)?;
          let #discriminant = <#vocabulary as #capability>::parse(&__ingraph_kind)
            .map_err(|__ingraph_unknown| #sqlx_error::ColumnDecode {
              index: ::std::borrow::ToOwned::to_owned(__ingraph_alias),
              source: ::std::boxed::Box::new(__ingraph_unknown),
            })?;
          // The DISCRIMINANT is read first, and that is the whole shape of the address decode: it
          // is what decides which variant the id is, so the per-kind branch has exactly one home
          // and `<I>Id::kind` reads the same fact back.
          let __ingraph_id: &::core::primitive::str = #id_alias.as_str();
          let #id = match #discriminant {
            #(#raised)*
          };
          #(#reads)*
          ::core::result::Result::Ok(Self { #discriminant, #id, #(#fields,)* })
        }
      }
    }
  }
}

/// What a database is CALLED in a sentence about its row — the record family's own answers, asked
/// here rather than restated, so one declaration's two projections are described alike.
///
/// Mongo is in the list and has no row: the word exists for a sentence, and which databases get a
/// projection is [`InterfaceModel::sql_databases`]'s answer.
pub(crate) const fn what(kind: DatabaseKind) -> &'static str {
  match kind {
    DatabaseKind::Sqlite => "SQLite",
    DatabaseKind::Postgres => "PostgreSQL",
    DatabaseKind::Mysql => "MySQL",
    DatabaseKind::Mongo => "MongoDB",
  }
}