Versions in this module Expand all Collapse all v0 v0.7.1 Sep 20, 2019 Changes in this version + var ErrNodeNotFound = errors.New("node not found") + func Create(ctx context.Context, tx *dgo.Txn, data interface{}, options ...MutateOptions) error + func CreateOrGet(ctx context.Context, tx *dgo.Txn, data interface{}, options ...MutateOptions) error + func GetNodeType(data interface{}) string + func Mutate(ctx context.Context, tx *dgo.Txn, data interface{}, options ...MutateOptions) error + func Node(jsonData []byte, model interface{}) error + func Nodes(jsonData []byte, model interface{}) error + func SetTypePrefix(prefix string) + func Update(ctx context.Context, tx *dgo.Txn, data interface{}, options ...MutateOptions) error + func UpdateOnConflict(ctx context.Context, tx *dgo.Txn, data interface{}, cb OnConflictCallback, ...) error + func Upsert(ctx context.Context, tx *dgo.Txn, data interface{}, options ...MutateOptions) error + type Deleter struct + func Delete(ctx context.Context, tx *dgo.Txn, model interface{}, opt ...MutateOptions) *Deleter + func (d *Deleter) After(uid string) *Deleter + func (d *Deleter) All(depthParam ...int) *Deleter + func (d *Deleter) Edge(uid, edgePredicate string, edgeUIDs ...string) error + func (d *Deleter) Filter(filter string) *Deleter + func (d *Deleter) First(n int) *Deleter + func (d *Deleter) Node() (uids []string, err error) + func (d *Deleter) Nodes() (uids []string, err error) + func (d *Deleter) Offset(n int) *Deleter + func (d *Deleter) OrderAsc(clause string) *Deleter + func (d *Deleter) OrderDesc(clause string) *Deleter + func (d *Deleter) Query(query string) *Deleter + func (d *Deleter) RootFunc(rootFunc string) *Deleter + func (d *Deleter) String() string + func (d *Deleter) UID(uid string) *Deleter + func (d *Deleter) Vars(funcDef string, vars map[string]string) *Deleter + type MultiError struct + Errors []error + func (e *MultiError) Collect(err error) + func (e *MultiError) Error() (errorStr string) + type MutateOptions struct + CommitNow bool + DisableInject bool + type NodeType interface + NodeType func() string + type NodeUnique interface + UniqueKeys func() []string + type NotNullError struct + Field string + func (n NotNullError) Error() string + type OnConflictCallback func(uniqueErr UniqueError, found, excluded interface{}) (updated interface{}) + type Query struct + func Get(ctx context.Context, tx *dgo.Txn, model interface{}) *Query + func (q *Query) After(uid string) *Query + func (q *Query) All(depthParam ...int) *Query + func (q *Query) Filter(filter string) *Query + func (q *Query) First(n int) *Query + func (q *Query) Node() (err error) + func (q *Query) Nodes() error + func (q *Query) Offset(n int) *Query + func (q *Query) OrderAsc(clause string) *Query + func (q *Query) OrderDesc(clause string) *Query + func (q *Query) Query(query string) *Query + func (q *Query) RootFunc(rootFunc string) *Query + func (q *Query) String() string + func (q *Query) UID(uid string) *Query + func (q *Query) Vars(funcDef string, vars map[string]string) *Query + type Schema struct + Count bool + Index bool + List bool + NotNull bool + Predicate string + Reverse bool + Tokenizer []string + Type string + Unique bool + Upsert bool + func (s Schema) String() string + type SchemaMap map[string]*Schema + func CreateSchema(c *dgo.Dgraph, models ...interface{}) (*SchemaMap, error) + func MutateSchema(c *dgo.Dgraph, models ...interface{}) (*SchemaMap, error) + func (s SchemaMap) String() string + type UniqueError struct + Field string + NodeType string + Value interface{} + func (u UniqueError) Error() string