graph

package
v0.0.0-...-bdab838 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dgraph

type Dgraph struct {
	Dgraph *dgo.Dgraph
	Conn   *grpc.ClientConn
	// contains filtered or unexported fields
}

func (*Dgraph) Client

func (db *Dgraph) Client() *dgo.Dgraph

func (*Dgraph) DeleteInterface

func (db *Dgraph) DeleteInterface(data interface{}) (*api.Response, error)

func (*Dgraph) DeleteJSON

func (db *Dgraph) DeleteJSON(data []byte) (*api.Response, error)

func (*Dgraph) NodeValueExists

func (db *Dgraph) NodeValueExists(node, value string) bool

func (*Dgraph) Query

func (db *Dgraph) Query(query string) (*api.Response, error)

func (*Dgraph) QueryWithVars

func (db *Dgraph) QueryWithVars(query string, vars map[string]string) (*api.Response, error)

func (*Dgraph) SetInterface

func (db *Dgraph) SetInterface(data interface{}) (*api.Response, error)

func (*Dgraph) SetJSON

func (db *Dgraph) SetJSON(data []byte) (*api.Response, error)

func (*Dgraph) SetSchema

func (db *Dgraph) SetSchema(schema string) error

type Graph

type Graph interface {
	Client() *dgo.Dgraph
	SetSchema(schema string) error
	SetJSON(data []byte) (*api.Response, error)
	SetInterface(data interface{}) (*api.Response, error)
	DeleteJSON(data []byte) (*api.Response, error)
	DeleteInterface(data interface{}) (*api.Response, error)
	Query(query string) (*api.Response, error)
	QueryWithVars(query string, vars map[string]string) (*api.Response, error)
	NodeValueExists(node, value string) bool
}

func OpenDgraph

func OpenDgraph(addr string) (Graph, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL