Versions in this module Expand all Collapse all v0 v0.1.0 Oct 20, 2020 Changes in this version + func ValidateCardinality(cardinality string) error + type Binding struct + ComponentType string + DataType string + DataView string + Default interface{} + Expression string + From string + Name string + Type string + When string + func (b *Binding) Init() + func (b Binding) Validate() error + type Cache struct + Service string + TTL time.Duration + TTLMs int + func (c *Cache) Init() + type Column struct + DataType string + Expression string + Name string + type ColumnMatch struct + Column string + RefColumn string + type Context struct + Db db.Service + View *View + func NewContext(ctx context.Context, view *View, db db.Service) *Context + type Criteria struct + Expression string + Params []string + type From struct + Fragments []*sql.Fragment + type IO struct + Cardinality string + CaseFormat string + DataView string + Key string + OmitEmpty bool + func (o *IO) Init() + func (o IO) SetOutput(collection gtly.Collection, output io.Output) + func (o IO) Validate() error + type Join struct + Alias string + On string + Table string + Type string + type Meta struct + Input []*IO + Output []*IO + TemplateURL string + Views []*View + func (m *Meta) ApplyTemplate() + func (m *Meta) Init() error + func (m *Meta) SetTemplate(template *Meta) + func (m *Meta) Validate() error + func (m *Meta) View(name string) (*View, error) + type Pool map[string]interface + type Record map[string]interface + type Reference struct + Cardinality string + DataView string + Name string + On []*ColumnMatch + func (r *Reference) Alias() string + func (r *Reference) Columns() []string + func (r *Reference) Criteria(alias string) string + func (r *Reference) Index() gtly.Index + func (r *Reference) RefColumns() []string + func (r *Reference) RefIndex() gtly.Index + func (r *Reference) View() *View + func (r Reference) Validate() error + type Selector struct + CaseFormat string + Columns []string + Criteria *Criteria + Limit int + Offset int + OmitEmpty bool + OrderBy string + Prefix string + func (s *Selector) Apply(bindings map[string]interface{}) + func (s *Selector) IsSelected(columns []string) bool + func (s Selector) Clone() *Selector + type Value struct + Prev *gtly.Object + func NewValue(object, prev *gtly.Object) *Value + type View struct + Alias string + Bindings []*Binding + Cache *Cache + CaseFormat string + Columns []*Column + Connector string + Criteria *Criteria + From *From + HideRefIDs bool + Joins []*Join + Mutable *bool + Name string + OnPath *Visitor + OnRead *Visitor + Params []interface{} + PrimaryKey []string + Refs []*Reference + Selector Selector + Table string + func (v *View) AddJoin(join *Join) + func (v *View) Cacher() cache.Service + func (v *View) Clone() *View + func (v *View) Init(setPrefix bool) error + func (v *View) IsMutable() bool + func (v *View) LoadSQL(ctx context.Context, fs afs.Service, parentURL string) error + func (v *View) MergeFrom(tmpl *View) + func (v View) BuildSQL(selector *Selector, bindings map[string]interface{}) (string, []interface{}, error) + func (v View) Validate() error + type Visit func(ctx *Context, value *Value) (bool, error) + type Visitor struct + Visitor string + func (v *Visitor) Init() error + func (v *Visitor) Visit(ctx *Context, value *Value) (bool, error) + type Visitors interface + Get func(name string) (Visit, error) + Register func(name string, visitor Visit) + Remove func(name string) + func VisitorRegistry() Visitors