Documentation
¶
Overview ¶
Package compiler validates canonical component metadata and produces the target-neutral handler AST.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EntityInvariants ¶
func EntityInvariants(entity *plan.EntityPlan) ([]plan.InvariantGroup, error)
EntityInvariants compiles authored field groups without mutating the entity plan. Field order remains canonical and group names share typecatalog naming.
Types ¶
type Compiler ¶
type Compiler struct{}
Compiler validates canonical metadata and builds target-neutral plans.
func (*Compiler) BuildInput ¶
BuildInput derives mutation request state from the canonical writable graph. It returns detached metadata; authored parameters retain their authority.
func (*Compiler) RefineCurrentField ¶
func (c *Compiler) RefineCurrentField(field plan.CurrentField, currentType, entityType string) (plan.CurrentField, error)
RefineCurrentField incorporates final canonical Go type identities into one declared projection. It does not infer whether a runtime query loaded it.
type CurrentBinding ¶
type CurrentBinding struct {
Lookup *plan.LookupProjection
ViewIdentity string
Param string
}
CurrentBinding maps one canonical record-view identity to the ordinary component input parameter that supplies its current rows.
type EntityHookCompiler ¶
type EntityHookCompiler struct {
Types *typecatalog.Resolver
// CanonicalType applies generated alias authority when declarations use
// package-local aliases for separately owned entities or contracts.
CanonicalType func(string) (string, error)
}
EntityHookCompiler validates authored hook contracts before target lowering. Instantiation and Bindly invocation lifetime belong to the generated program.
func (EntityHookCompiler) Compile ¶
func (c EntityHookCompiler) Compile(request EntityHookRequest) (spec.TypeRef, error)
type EntityHookRequest ¶
type EntityHookRequest struct{ Hook, Entity, Parent, Input, Output string }
EntityHookRequest carries canonical entity/parent identities, not runtime values. Parent is empty only at the root, whose typed parent is NoParent.