query

package
v0.0.0-...-3a6b306 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	DB      *graph.Database
	Queries map[string]*Query
	sync.RWMutex
}

func NewClient

func NewClient(db *graph.Database) *Client

func (*Client) NewQuery

func (client *Client) NewQuery(name string) *Query

func (*Client) Query

func (client *Client) Query(name string) *Query

type Cursor

type Cursor struct {
	Traversal *Traversal
	Stage     int
	Index     int
	Parent    *Cursor
	sync.RWMutex
}

type Cursors

type Cursors []*Cursor

func (Cursors) Last

func (cursors Cursors) Last() *Cursor

type Query

type Query struct {
	DB             *graph.Database
	Name           string
	Cursors        Cursors
	Traversals     []*Traversal
	TraversalCount int
	Limit          int64
	Export         bool
}

func (*Query) Class

func (query *Query) Class(class *graph.Class) *Query

func (*Query) Exec

func (query *Query) Exec(inputs ...*graph.Vertex) (bool, *QueryExec)

func (*Query) Exported

func (query *Query) Exported() *Query

func (*Query) Filter

func (query *Query) Filter(filters map[string]interface{}) *Query

func (*Query) In

func (query *Query) In(predicate *graph.Predicate) *Query

func (*Query) Out

func (query *Query) Out(predicate *graph.Predicate) *Query

func (*Query) Traverse

func (query *Query) Traverse(predicate *graph.Predicate, phase bool) *Query

type QueryExec

type QueryExec struct {
	Query   *Query
	Lists   [][]*graph.Link
	Results []*graph.Vertex
	sync.RWMutex
}

func (*QueryExec) List

func (qx *QueryExec) List(cursor *Cursor) []*graph.Link

func (*QueryExec) LoadList

func (qx *QueryExec) LoadList(cursor *Cursor, vtx *graph.Vertex) bool

func (*QueryExec) Next

func (qx *QueryExec) Next(cursor *Cursor, vtx *graph.Vertex) bool

func (*QueryExec) Vertex

func (qx *QueryExec) Vertex(cursor *Cursor) *graph.Vertex

type Traversal

type Traversal struct {
	Predicate *graph.Predicate
	Phase     bool
	Filters   map[string]interface{}
	Class     *graph.Class
}

func (*Traversal) Exec

func (traversal *Traversal) Exec(vtx *graph.Vertex) (bool, []*graph.Link)

Jump to

Keyboard shortcuts

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