Documentation
¶
Overview ¶
Package plan defines normalization and shape-planning responsibilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Planner ¶
type Planner struct{}
Planner normalizes scan descriptors into shape plan.
func (*Planner) Plan ¶
func (p *Planner) Plan(_ context.Context, scanned *shape.ScanResult, _ ...shape.PlanOption) (*shape.PlanResult, error)
Plan implements shape.Planner.
type Relation ¶
type Relation struct {
Name string
Holder string
Ref string
Table string
Kind string
Raw string
On []*RelationLink
Warnings []string
}
Relation is normalized relation metadata extracted from DQL joins.
type RelationLink ¶
type RelationLink struct {
ParentField string
ParentNamespace string
ParentColumn string
RefField string
RefNamespace string
RefColumn string
Expression string
}
RelationLink represents one parent/ref join predicate.
type Result ¶
type Result struct {
RootType reflect.Type
EmbedFS *embed.FS
Fields []*Field
ByPath map[string]*Field
Views []*View
ViewsByName map[string]*View
States []*State
Types []*Type
ColumnsDiscovery bool
TypeContext *typectx.Context
Directives *dqlshape.Directives
Diagnostics []*dqlshape.Diagnostic
}
Result is normalized shape plan produced from scan descriptors.
type State ¶
type State struct {
Path string
Name string
Kind string
In string
QuerySelector string
When string
Scope string
DataType string
Value string
Required *bool
Async bool
Cacheable *bool
With string
URI string
ErrorCode int
ErrorMessage string
Predicates []*StatePredicate
TagType reflect.Type
EffectiveType reflect.Type
}
State is a normalized parameter field plan.
type StatePredicate ¶
StatePredicate captures parameter predicate semantics from DQL declarations.
type Type ¶
type Type struct {
Name string
Alias string
DataType string
Cardinality string
Package string
ModulePath string
}
Type is normalized type metadata collected during compile.
type View ¶
type View struct {
Path string
Name string
Ref string
Mode string
Table string
Module string
Connector string
CacheRef string
Partitioner string
PartitionedConcurrency int
RelationalConcurrency int
SQL string
SQLURI string
Summary string
Relations []*Relation
Holder string
AllowNulls *bool
SelectorNamespace string
SelectorNoLimit *bool
SchemaType string
ColumnsDiscovery bool
Cardinality string
ElementType reflect.Type
FieldType reflect.Type
Declaration *ViewDeclaration
}
View is a normalized view field plan.
type ViewDeclaration ¶
type ViewDeclaration struct {
Tag string
Codec string
CodecArgs []string
HandlerName string
HandlerArgs []string
StatusCode *int
ErrorMessage string
QuerySelector string
CacheRef string
Limit *int
Cacheable *bool
When string
Scope string
DataType string
Of string
Value string
Async bool
Output bool
Predicates []*ViewPredicate
}
ViewDeclaration captures declaration options used to derive a view from DQL directives.