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.
Re-exports§
pub use composite_key::parse_composite_id_attribute;pub use composite_unique::parse_composite_unique_attribute;pub use model::Attribute;pub use model::EnumDecl;pub use model::EnumVariant;pub use model::Field;pub use model::MixinDecl;pub use model::Model;pub use model::TypeArity;pub use model::TypeDecl;pub use model::TypeRef;pub use procedure::Procedure;pub use procedure::ProcedureArg;pub use procedure::ProcedureKind;pub use selection::SelectionQuery;pub use view::View;pub use view::ViewSource;
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§
Enums§
- 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.