Documentation ¶
Index ¶
- Constants
- func EncodeGraphQueries(source []GraphQuery) []*gql.GraphQuery
- func EncodeGraphQuery(source GraphQuery) *gql.GraphQuery
- type Arg
- type Assoc
- type Computed
- type FacetParam
- type FacetParams
- type FilterTree
- type Function
- type GraphQuery
- type GroupByAttr
- type MathTree
- type Operator
- type Order
- type RecurseArgs
- type ShortestPathArgs
- type TypeID
- type Val
- type VarContext
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func EncodeGraphQueries ¶
func EncodeGraphQueries(source []GraphQuery) []*gql.GraphQuery
func EncodeGraphQuery ¶
func EncodeGraphQuery(source GraphQuery) *gql.GraphQuery
Types ¶
type Arg ¶
type Computed ¶
type FacetParam ¶
type FacetParams ¶
type FacetParams struct { AllKeys bool `yaml:"allKeys,omitempty" json:"allKeys,omitempty"` Param []FacetParam `yaml:"param,omitempty" json:"param,omitempty"` }
type FilterTree ¶
type FilterTree struct { Op Operator `yaml:"op,omitempty" json:"op,omitempty"` Child []FilterTree `yaml:"child,omitempty" json:"child,omitempty"` Func *Function `yaml:"func,omitempty" json:"func,omitempty"` }
type Function ¶
type Function struct { Attr string `yaml:"attr,omitempty" json:"attr,omitempty"` Lang string `yaml:"lang,omitempty" json:"lang,omitempty"` // language of the attribute value Name string `yaml:"name,omitempty" json:"name,omitempty"` // Specifies the name of the function. Args []Arg `yaml:"args,omitempty" json:"args,omitempty"` // Contains the arguments of the function. UID []uint64 `yaml:"uid,omitempty" json:"uid,omitempty"` NeedsVar []VarContext `yaml:"needsVar,omitempty" json:"needsVar,omitempty"` // If the function requires some variable IsCount bool `yaml:"isCount,omitempty" json:"isCount,omitempty"` // gt(count(friends),0) IsValueVar bool `yaml:"isValueVar,omitempty" json:"isValueVar,omitempty"` // eq(val(s), 5) }
type GraphQuery ¶
type GraphQuery struct { UID []uint64 `yaml:"uid,omitempty" json:"uid,omitempty"` Attr string `yaml:"attr,omitempty" json:"attr,omitempty"` Langs []string `yaml:"langs,omitempty" json:"langs,omitempty"` Alias string `yaml:"alias,omitempty" json:"alias,omitempty"` Model string `yaml:"model,omitempty" json:"model,omitempty"` Default interface{} `yaml:"default,omitempty" json:"default,omitempty"` Assoc Assoc `yaml:"assoc,omitempty" json:"assoc,omitempty"` IsCount bool `yaml:"isCount,omitempty" json:"isCount,omitempty"` Computed *Computed `yaml:"computed,omitempty" json:"computed,omitempty"` IsInternal bool `yaml:"isInternal,omitempty" json:"isInternal,omitempty"` IsGroupby bool `yaml:"isGroupby,omitempty" json:"isGroupby,omitempty"` Var string `yaml:"var,omitempty" json:"var,omitempty"` NeedsVar []VarContext `yaml:"needsVar,omitempty" json:"needsVar,omitempty"` Func *Function `yaml:"func,omitempty" json:"func,omitempty"` Expand string `yaml:"expand,omitempty" json:"expand,omitempty"` // Which variable to expand with. Args map[string]string `yaml:"args,omitempty" json:"args,omitempty"` // Query can have multiple sort parameters. Order []Order `yaml:"order,omitempty" json:"order,omitempty"` Children []GraphQuery `yaml:"children,omitempty" json:"children,omitempty"` Recurse bool `yaml:"recurse,omitempty" json:"recurse,omitempty"` RecurseArgs *RecurseArgs `yaml:"recurseArgs,omitempty" json:"recurseArgs,omitempty"` ShortestPathArgs *ShortestPathArgs `yaml:"shortestPathArgs,omitempty" json:"shortestPathArgs,omitempty"` Filter *FilterTree `yaml:"filter,omitempty" json:"filter,omitempty"` MathExp *MathTree `yaml:"mathExp,omitempty" json:"mathExp,omitempty"` Normalize bool `yaml:"normalize,omitempty" json:"normalize,omitempty"` Facets *FacetParams `yaml:"facets,omitempty" json:"facets,omitempty"` FacetsFilter *FilterTree `yaml:"facetsFilter,omitempty" json:"facetsFilter,omitempty"` GroupbyAttrs []GroupByAttr `yaml:"groupbyAttrs,omitempty" json:"groupbyAttrs,omitempty"` FacetVar map[string]string `yaml:"facetVar,omitempty" json:"facetVar,omitempty"` FacetOrder string `yaml:"facetOrder,omitempty" json:"facetOrder,omitempty"` FacetDesc bool `yaml:"facetDesc,omitempty" json:"facetDesc,omitempty"` }
func CopyGraphQueries ¶
func CopyGraphQueries(source []GraphQuery) []GraphQuery
func CopyGraphQuery ¶
func CopyGraphQuery(source GraphQuery) GraphQuery
func DecodeGraphQueries ¶
func DecodeGraphQueries(source []*gql.GraphQuery) []GraphQuery
func DecodeGraphQuery ¶
func DecodeGraphQuery(source *gql.GraphQuery) GraphQuery
func Recurse ¶
func Recurse(root GraphQuery, attribute string, depth int) GraphQuery
type GroupByAttr ¶
type MathTree ¶
type MathTree struct { Fn string `yaml:"fn,omitempty" json:"fn,omitempty"` Var string `yaml:"var,omitempty" json:"var,omitempty"` Const Val `yaml:"const,omitempty" json:"const,omitempty"` // This will always be parsed as a float value Val map[uint64]Val `yaml:"val,omitempty" json:"val,omitempty"` Child []MathTree `yaml:"child,omitempty" json:"child,omitempty"` }
type Order ¶
type RecurseArgs ¶
type ShortestPathArgs ¶
Click to show internal directories.
Click to hide internal directories.