Documentation ¶
Index ¶
Constants ¶
const DgraphType = "<dgraph.type>"
DgraphType is a predicate that is specific to the dgraph database
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct {
Alias, Name string
Filters []FilterFunction
Expansion []Field
}
Field defines the outline for guts of a query
type FilterCombinator ¶
type FilterCombinator int
FilterCombinator defines values that describe the operators to combine filters
const ( AND FilterCombinator = 1 << iota OR NOT )
Defines the Values used for FilterCombinators
type FilterFunction ¶
type FilterFunction struct {
Type FilterFunctionType
}
FilterFunction provides a definition for the rdf filter functions to be constructed
type FilterFunctionType ¶
type FilterFunctionType int
FilterFunctionType defines values that describe the different filters
const ( UID FilterFunctionType = 1 << iota UIDIn Has EQ LT GT LE GE AllOfTerms AnyOfTerms Match AllOfText AnyOfText )
Defines the values used for FilterFunctionType
type MutationBuilder ¶
type MutationBuilder struct {
// contains filtered or unexported fields
}
MutationBuilder is a struct used for building mutation queries
func NewMutationBuilder ¶
func NewMutationBuilder() *MutationBuilder
NewMutationBuilder returns a new graphql+- mutation query builder
func (*MutationBuilder) AddTerm ¶
func (b *MutationBuilder) AddTerm(subject, predicate, value string) *MutationBuilder
AddTerm ads an RDF triple to the Proposed Query
func (*MutationBuilder) Build ¶
func (b *MutationBuilder) Build() string
Build returns the constructed RDF, graphql +- query
type QueryBuilder ¶
type QueryBuilder struct { Fields []Field RootFilter string RootFunction string // contains filtered or unexported fields }
QueryBuilder represents a struct that will allow the user to quickly build queries
func NewQueryBuilder ¶
func NewQueryBuilder() *QueryBuilder
NewQueryBuilder returns an object to construct your graphql+- queries