Skip to main content

Module model

Module model 

Source
Expand description

What a record means, once every rule has been checked — the shape crate::emit turns into tokens.

A record’s key is FLAT and it is lineage ⊕ id: the full path from the root, root-first, then the record’s own id. Root-first is load-bearing rather than cosmetic: root attribution reads the leading column, and the blob address the key walks into nests its parents as directories, so a lineage-scoped removal is one prefix. [Lineage::fields] therefore preserves the order it was given.

RecordModel is PLAIN: public fields, no constructor of its own, and nothing that parses. A derive builds one from a decorated declaration; ingraph-compiler will later build the same one from a manifest entry. Both reach the same emitter, and neither is this crate’s business — which is also where VALIDATION lives, with whoever holds the source spans to report against.

Emitted NAMES are resolved before they get here: the model says what each type is called, and the emitter does not decide. The convention those names default to lives here all the same (default_key_name, default_lineage_name) so that every front end defaults alike rather than each keeping its own copy of the suffix rule.

Structs§

AliasOptions
<db>(alias(prefix = "__mine", depth = 16)) — one database’s answer about the names its nested scopes mint, in the two states each half has.
Artifact
One ARTIFACT position: a blob family derived from this record’s messages, under the name this record answers an address for it by.
ArtifactBytes
The wire field one artifact position’s data ask mints.
AsyncGraphql
The async-graphql backend’s rendering.
BackendError
ONE CELL of the record’s declared conversion errors: which crossing, which database, and the type its fallible impls answer with.
ChangesFeed
A CHANGE FEED as an edge’s intake: which database’s feed, and whose hand fills it.
Column
One column of one emitted type.
CompositeUnique
ONE <db>(unique(a, b, …)) — a COMPOSITE unique constraint, resolved to this database’s own column names.
Condition
The CONDITION a field is DECLARED UNDER — the #[cfg(…)] attributes written on it.
Declared
One TYPE an emission declares, and what it is.
Derived
One REVERSE position: a record that points at this one, under the name this record calls it by.
Face
One SCHEMA POSITION of one field: what it is CALLED there, and what rides on it verbatim.
FallibleConversion
A crossing that can FAIL, and how its error reaches the record’s own.
FanIn
Several upstreams producing INDEPENDENT outputs — M×N, N ≤ M.
Field
One field of the RECORD, and how its own accessors are shaped.
Fill
What fills a SKIPPED field when a row is raised back into the record.
Filled
ONE field a database’s row does not carry, and what its raise supplies instead.
FrameworkMarker
The payload of Marker::Framework: one of the framework’s own markers, written as the bare word it is short for, and — where the word names a COLLECTION — the element’s own word inside it.
Fusion
A FUSING node’s upstreams: the several messages that jointly make one output, and which of them this node’s identity descends from.
Grant
ONE write grant: the node it names, and the accessor that names it back.
Grants
The write word: the stores ONE poll entry granted its ticks, grant by grant.
Graphql
The record’s WIRE face: which GraphQL backends render it, and what each one calls it.
GraphqlField
One field of the wire face, in both of its schema positions.
Key
The emitted key type: lineage ⊕ id, flat, root-first.
Kind
One upstream of a fan-in: the node, and the word that names it everywhere a discriminant is spelled.
Lineage
A record’s ancestry, and the name of the type that carries it.
Mirror
One lineage column, and the field of the parent’s key it equals.
MongoDatabase
MongoDB’s own options.
MySqlDatabase
MySQL’s own options.
Persist
Where a record is stored, and what each database’s row holds.
PersistColumn
One column of ONE database’s row.
PollEntry
ONE poll(…) entry: the name it MINTS, and the clock it runs on.
Polls
The poll(…) entries: a node’s own clocks, entry by entry.
PostgresDatabase
PostgreSQL’s own options.
PostgresProgress
PostgreSQL’s own ledger options — none yet, for SqliteProgress’s reason.
Product
ONE product: the type that travels, and the word that names it.
Products
emits: the products a node puts on its edges.
Progress
The record’s PROGRESS ledger: which databases host it.
RecordModel
A validated record: what it is called, what it emits, and every field it declares.
Reference
A field’s ref(…): the record it names, and how the referring value is reached from the field’s own type.
SqliteDatabase
SQLite’s own options.
SqliteProgress
SQLite’s own ledger options — none yet. The control tables’ names come from the store’s ControlTables at construction, and the root column’s type from the root itself.
Storage
What every backend carries, whatever its own vocabulary adds.
Subscription
The subscribe(…) container: a node’s whole FAN-IN, entry by entry.
Upstream
ONE entry of a subscribe(…) container: an upstream, how it arrives, and which of its products this edge carries.
WireLeg
ONE database’s leg of a wire crossing.
WirePosition
ONE POSITION of a field’s wire crossing: a leg per database, and the error a fallible one answers with.

Enums§

ChannelOptions
WHAT an edge is opened as, as the declaration wrote it — the framework’s own ChannelOptions vocabulary, mirrored here because the front end cannot depend on the crate it emits for.
Conversion
How one side of a conversion is performed.
Crossing
Which CROSSING a declared error covers — one IMPL FAMILY each, reached through the words the field blocks already speak.
DatabaseBackend
One database a record is stored in — as the backend it actually is.
DatabaseKind
A database a record may be stored in.
GraphqlBackend
One GraphQL backend’s rendering of a record.
GraphqlKind
A GraphQL backend a record may be rendered by.
Label
An interpretation the FRAMEWORK names — the words a declaration may write bare.
Marker
Which INTERPRETATION a field’s type is read under, when a declaration names one.
NodeKind
WHICH NODE a declaration is — one word per derive, carried past validation because the emission reads it too.
PollBody
WHO runs one poll entry’s ticks — the two roads a clock’s mandatory body word names.
PollCadence
The clock ONE poll entry runs on — an interval, or a calendar expression.
PollMode
WHERE one poll entry’s tick runs — the mandatory word, and the whole of the vocabulary.
ProgressHost
One database hosting a record’s progress ledger.
Projection
How a column is handed out by an accessor.
Role
Which of a declaration’s emitted types one is — the phrase a refusal names it by.
Shape
The two things a lineage can BE, and therefore the two types that can be emitted for one.
Through
WHERE the referring value sits inside the field’s declared type.
TracingLevel
The LEVEL a node’s spans open at — the closed vocabulary tracing(level = …) writes.
Upstreams
How a node with several upstreams RELATES to them — the mode the bare word key selects.

Constants§

MONGO_ID
The key MongoDB stores a record’s id under.

Functions§

borrowed_key
The FIELD a derived index carries its upstream’s key in — the one field a macro in this family adds to a declaration its author wrote.
boxed_error
The refusal a fallible crossing answers with when the declaration named none.
default_channels_name
What a node’s CHANNELS SHELF is called: <Node>Channels.
default_column_filter_name
What the STORED face of a fragment’s predicate is called: <base>ColumnFilter.
default_comparison_name
What one database’s comparison type is called: the row’s name, suffixed.
default_downstream_name
What a node’s own DOWNSTREAM is called: <Node>Downstream.
default_due_name
What a node’s POLL vocabulary is called: <Node>Due.
default_filter_name
What a record’s filter is called. ONE per record — see Graphql::filter.
default_in_name
What a node’s FAN-IN sum is called: <Node>In.
default_indexer_name
What a SUBSCRIBING derived index’s node is called: <Decl>Indexer, the launchable unit that receives the upstream’s messages and fills this declaration’s corpora.
default_input_name
What a record’s wire INPUT is called: <Record>GraphqlInput, the object a query’s arguments arrive in.
default_key_input_name
What a COMPOUND record’s key argument object is called IN RUST: <Record>KeyInput, the address a client sends when the whole address is more than an id.
default_key_name
What a record’s key type is called when nothing renamed it: <Record>Key.
default_key_output_name
What a record’s key output is called. ONE per record — see default_output_name.
default_lineage_name
What a record’s lineage type is called when nothing renamed it: <Record>Lineage.
default_order_by_name
What a record’s order-by is called. ONE per record — see Graphql::filter.
default_out_kind_name
What a node’s product VOCABULARY is called: <Node>OutKind.
default_out_name
What a node’s PRODUCT sum is called: <Node>Out.
default_output_name
What a record’s wire output is called. ONE per record — the SDL is identical whichever Rust library serves it, so the type carries cfg-gated derives per declared backend rather than splitting into one type per backend.
default_polling_name
What a node’s LENDING is called: <Node>Polling.
default_queries_name
What a record’s QUERY UNIT is called: <Record>Queries, the type a root folds to serve this record’s root fields.
default_row_name
What a record’s row type is called in one database when nothing renamed it: <Record><Suffix>.
default_sweeps_name
What a node’s SWEEP TRAIT is called: <Node>Sweeps.
elected_marker
What ONE ELECTION’s marker type is called: <Record>By<Field>.
fanned_lineage
The field a FAN-IN node carries its lineage in — borrowed_key’s sibling, obeying the same frame law and injected the same way.
fanned_lineage_column
The column that field becomes IN THE KEY.
one_storage_marker
The item a storage node mints so that a second storage on the same type cannot be spelled.
poll_grants_name
What ONE CLOCK’s grants context is called: <Node><Poll>Grants.
shelf_name
The shelf field ONE variant word takes — its snake case, kept spellable where that is a keyword.
stored_type
The type ONE DATABASE stores a column at: the declared pin, or the domain type.