Expand description
Schema IR — the parsed shape of a .cstack file. Every IR node
carries source-span back-pointers so consumers can map errors to
positions in the original text.
Modules§
- composite_
key - Parsing for the model-level
@@id([...])composite-primary-key attribute (Prisma’s spelling). Mirrorscrate::events::parse_emit_attribute’s shape: syntax parsing lives here incratestack-coreso both the parser’s semantic checker and any other consumer share one implementation. The bracketed-field-list syntax itself is shared with@@unique([...])— see [super::field_list]. - composite_
unique - Parsing for the model-level
@@unique([...])composite-unique attribute (Prisma’s spelling). Shares its syntax rules with@@id([...])via [super::field_list]; what differs is the semantics — a composite unique constraint, not the primary key — and the error text pointing at the single-field alternative. - model
- Model / mixin / type / enum / field IR nodes parsed out of a
.cstackfile. Every IR node carriesSourceSpanback-pointers so consumers (parser, LSP, generators) can map errors to source positions. - procedure
- Procedure / query-mutation IR nodes parsed out of a
.cstackfile. - selection
- Field selection / include shape used by the column-projection path.
- view
- View IR — the
view <Name> from <Model>, ... { ... }block.
Structs§
- Attribute
- Auth
Block - Config
Block - Config
Entry - Datasource
- Enum
Decl - Enum
Variant - Field
- Mixin
Decl - Model
- Owned
Schema Summary - Procedure
- Procedure
Arg - Schema
- Schema
Summary - Selection
Query - Source
Span - Type
Decl - TypeRef
- View
- View
Source
Enums§
- Procedure
Kind - Transport
Style - Wire-shape the schema generates for. Picked once per schema (via
the top-level
transport rest|rpcdirective) so generated servers and clients only carry one binding’s worth of surface. - Type
Arity
Functions§
- parse_
composite_ id_ attribute - Parses
@@id([field1, field2, ...])into its ordered list of local field names. Callers are responsible for checking that each name resolves to a real scalar field on the model. - parse_
composite_ unique_ attribute - Parses
@@unique([field1, field2, ...])into its ordered list of local field names. Callers are responsible for checking that each name resolves to a real scalar field on the model.