Documentation
¶
Overview ¶
Package query helps maintain aliases to each table so that when joins and columns are added they can be properly aliased.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(multitenancyVal, model interface{}, filters tags.Filterable, associations []tags.Association, selectFields []string, filterMetadata *tags.TableMetadata) (*qp.Table, error)
Build takes the filter model and returns a query object. It takes the multitenancy value, current reflected value, and any tags
func Hydrate ¶
func Hydrate(filterModel interface{}, tblAlias string, aliasMap map[string]qp.FieldDescriptor, rows *sql.Rows, meta *tags.TableMetadata) ([]*reflect.Value, error)
Hydrate takes the rows and pops them into the correct struct, in the correct order. This is usually called after you've built and executed the query model.
func NewAliased ¶
NewAliases returns a new table with the given alias
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.