Help us shape the future of Go! Take the 2026 Go Developer Survey

query

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessGraph

func ProcessGraph(ctx context.Context, sg *SubGraph, rch chan error)

Types

type Latency

type Latency struct {
	Start          time.Time     `json:"-"`
	Parsing        time.Duration `json:"query_parsing"`
	Processing     time.Duration `json:"processing"`
	Json           time.Duration `json:"json_conversion"`
	ProtocolBuffer time.Duration `json:"pb_conversion"`
}

func (*Latency) ToMap

func (l *Latency) ToMap() map[string]string

type ListChannel

type ListChannel struct {
	TList *task.UidList
	Idx   int
}

type SubGraph

type SubGraph struct {
	Attr     string
	Count    int
	Offset   int
	Children []*SubGraph

	Query  []byte
	Result []byte
}

SubGraph is the way to represent data internally. It contains both the query and the response. Once generated, this can then be encoded to other client convenient formats, like GraphQL / JSON.

func ToSubGraph

func ToSubGraph(ctx context.Context, gq *gql.GraphQuery) (*SubGraph, error)

func (*SubGraph) ToJson

func (g *SubGraph) ToJson(l *Latency) (js []byte, rerr error)

func (*SubGraph) ToProtocolBuffer

func (g *SubGraph) ToProtocolBuffer(l *Latency) (n *graph.Node, rerr error)

This method transforms the predicate based subgraph to an predicate-entity based protocol buffer subgraph.

Directories

Path Synopsis
Package graph is a generated protocol buffer package.
Package graph is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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