Documentation ¶
Index ¶
- Constants
- func BuildParamsHeader(params map[string]interface{}) string
- func RandomString(n int) string
- func ToString(i interface{}) string
- type Edge
- type Graph
- func (g *Graph) AddEdge(e *Edge) error
- func (g *Graph) AddNode(n *Node)
- func (g *Graph) CallProcedure(procedure string, yield []string, args ...interface{}) (*QueryResult, error)
- func (g *Graph) Commit() (*QueryResult, error)
- func (g *Graph) Delete() error
- func (g *Graph) ExecutionPlan(q string) (string, error)
- func (g *Graph) Flush() (*QueryResult, error)
- func (g *Graph) Labels() []string
- func (g *Graph) Merge(p string) (*QueryResult, error)
- func (g *Graph) ParameterizedQuery(q string, params map[string]interface{}) (*QueryResult, error)
- func (g *Graph) PropertyKeys() []string
- func (g *Graph) Query(q string) (*QueryResult, error)
- func (g *Graph) RelationshipTypes() []string
- type Node
- type Path
- type QueryResult
- func (qr *QueryResult) Empty() bool
- func (qr *QueryResult) IndicesCreated() int
- func (qr *QueryResult) IndicesDeleted() int
- func (qr *QueryResult) LabelsAdded() int
- func (qr *QueryResult) Next() bool
- func (qr *QueryResult) NodesCreated() int
- func (qr *QueryResult) NodesDeleted() int
- func (qr *QueryResult) PrettyPrint()
- func (qr *QueryResult) PropertiesSet() int
- func (qr *QueryResult) Record() *Record
- func (qr *QueryResult) RelationshipsCreated() int
- func (qr *QueryResult) RelationshipsDeleted() int
- func (qr *QueryResult) RunTime() int
- type QueryResultHeader
- type Record
- type ResultSetColumnTypes
- type ResultSetScalarTypes
Constants ¶
const ( LABELS_ADDED string = "Labels added" NODES_CREATED string = "Nodes created" NODES_DELETED string = "Nodes deleted" RELATIONSHIPS_DELETED string = "Relationships deleted" PROPERTIES_SET string = "Properties set" RELATIONSHIPS_CREATED string = "Relationships created" INDICES_CREATED string = "Indices created" INDICES_DELETED string = "Indices deleted" INTERNAL_EXECUTION_TIME string = "internal execution time" )
Variables ¶
This section is empty.
Functions ¶
func BuildParamsHeader ¶
Types ¶
type Edge ¶
type Edge struct { ID uint64 Relation string Source *Node Destination *Node Properties map[string]interface{} // contains filtered or unexported fields }
Edge represents an edge connecting two nodes in the graph.
func (Edge) DestNodeID ¶
func (*Edge) GetProperty ¶
func (*Edge) SetProperty ¶
func (Edge) SourceNodeID ¶
type Graph ¶
type Graph struct { Id string Nodes map[string]*Node Edges []*Edge Conn redis.Conn // contains filtered or unexported fields }
Graph represents a graph, which is a collection of nodes and edges.
func (*Graph) CallProcedure ¶
func (g *Graph) CallProcedure(procedure string, yield []string, args ...interface{}) (*QueryResult, error)
CallProcedure invokes procedure.
func (*Graph) Commit ¶
func (g *Graph) Commit() (*QueryResult, error)
Commit creates the entire graph, but will re-add nodes if called again.
func (*Graph) ExecutionPlan ¶
ExecutionPlan gets the execution plan for given query.
func (*Graph) Flush ¶
func (g *Graph) Flush() (*QueryResult, error)
Flush will create the graph and clear it
func (*Graph) ParameterizedQuery ¶
func (g *Graph) ParameterizedQuery(q string, params map[string]interface{}) (*QueryResult, error)
func (*Graph) PropertyKeys ¶
PropertyKeys, retrieves all properties names.
func (*Graph) Query ¶
func (g *Graph) Query(q string) (*QueryResult, error)
Query executes a query against the graph.
func (*Graph) RelationshipTypes ¶
RelationshipTypes, retrieves all edge relationship types.
type Node ¶
type Node struct { ID uint64 Label string Alias string Properties map[string]interface{} // contains filtered or unexported fields }
Node represents a node within a graph.
func (Node) GetProperty ¶
func (*Node) SetProperty ¶
type Path ¶
func (Path) NodesCount ¶
type QueryResult ¶
type QueryResult struct {
// contains filtered or unexported fields
}
QueryResult represents the results of a query.
func QueryResultNew ¶
func QueryResultNew(g *Graph, response interface{}) (*QueryResult, error)
func (*QueryResult) Empty ¶
func (qr *QueryResult) Empty() bool
func (*QueryResult) IndicesCreated ¶
func (qr *QueryResult) IndicesCreated() int
func (*QueryResult) IndicesDeleted ¶
func (qr *QueryResult) IndicesDeleted() int
func (*QueryResult) LabelsAdded ¶
func (qr *QueryResult) LabelsAdded() int
func (*QueryResult) Next ¶
func (qr *QueryResult) Next() bool
Next returns true only if there is a record to be processed.
func (*QueryResult) NodesCreated ¶
func (qr *QueryResult) NodesCreated() int
func (*QueryResult) NodesDeleted ¶
func (qr *QueryResult) NodesDeleted() int
func (*QueryResult) PrettyPrint ¶
func (qr *QueryResult) PrettyPrint()
PrettyPrint prints the QueryResult to stdout, pretty-like.
func (*QueryResult) PropertiesSet ¶
func (qr *QueryResult) PropertiesSet() int
func (*QueryResult) Record ¶
func (qr *QueryResult) Record() *Record
Record returns the current record.
func (*QueryResult) RelationshipsCreated ¶
func (qr *QueryResult) RelationshipsCreated() int
func (*QueryResult) RelationshipsDeleted ¶
func (qr *QueryResult) RelationshipsDeleted() int
func (*QueryResult) RunTime ¶
func (qr *QueryResult) RunTime() int
type QueryResultHeader ¶
type QueryResultHeader struct {
// contains filtered or unexported fields
}
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
func (*Record) GetByIndex ¶
type ResultSetColumnTypes ¶
type ResultSetColumnTypes int
const ( COLUMN_UNKNOWN ResultSetColumnTypes = iota COLUMN_SCALAR COLUMN_NODE COLUMN_RELATION )
type ResultSetScalarTypes ¶
type ResultSetScalarTypes int
const ( VALUE_UNKNOWN ResultSetScalarTypes = iota VALUE_NULL VALUE_STRING VALUE_INTEGER VALUE_BOOLEAN VALUE_DOUBLE VALUE_ARRAY VALUE_EDGE VALUE_NODE VALUE_PATH )