Documentation ¶
Index ¶
- func DeleteEdge(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, ...) error
- func GetDirectChildren(stub cached_stub.CachedStubInterface, graphName string, nodeId string) ([]string, error)
- func GetDirectParents(stub cached_stub.CachedStubInterface, graphName string, nodeId string) ([]string, error)
- func GetEdge(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, ...) ([]byte, map[string]string, error)
- func GetFirstEdgeContainingNodeId(stub cached_stub.CachedStubInterface, graphName string, nodeId string) ([]byte, error)
- func HasEdge(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, ...) (bool, error)
- func HasPath(stub cached_stub.CachedStubInterface, graphName string, path []string) (bool, error)
- func PutEdge(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, ...) error
- func SlowFindPath(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, ...) ([]string, error)
- func SlowGetChildren(stub cached_stub.CachedStubInterface, graphName string, nodeId string, ...) ([]string, error)
- func SlowGetParents(stub cached_stub.CachedStubInterface, graphName string, nodeId string, ...) ([]string, error)
- type Edge
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteEdge ¶
func DeleteEdge(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, targetNodeId string) error
DeleteEdge deletes an edge value.
func GetDirectChildren ¶
func GetDirectChildren(stub cached_stub.CachedStubInterface, graphName string, nodeId string) ([]string, error)
GetDirectChildren returns the immediate children of the given nodeId
func GetDirectParents ¶
func GetDirectParents(stub cached_stub.CachedStubInterface, graphName string, nodeId string) ([]string, error)
GetDirectParents returns the immediate parents of the given nodeId
func GetEdge ¶
func GetEdge(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, targetNodeId string) ([]byte, map[string]string, error)
GetEdge gets an edge value and edge data given node ids. Returns edge value, edge data, error.
func GetFirstEdgeContainingNodeId ¶
func GetFirstEdgeContainingNodeId(stub cached_stub.CachedStubInterface, graphName string, nodeId string) ([]byte, error)
GetFirstEdgeContainingNodeId returns the first edge value of edge that contains node id.
func HasEdge ¶
func HasEdge(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, targetNodeId string) (bool, error)
HasEdge checks if the edge exists in the graph.
func HasPath ¶
func HasPath(stub cached_stub.CachedStubInterface, graphName string, path []string) (bool, error)
HasPath checks if the path exists in the graph. The existence of a path from an id to the same id will return true.
func PutEdge ¶
func PutEdge(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, targetNodeId string, edge ...interface{}) error
PutEdge updates an existing edge or adds an edge if it does not exist. edge is an edgeValue ([]byte), and edgeData is a map[string]string (optional)
func SlowFindPath ¶
func SlowFindPath(stub cached_stub.CachedStubInterface, graphName string, startNodeId string, targetNodeId string, filterRule ...interface{}) ([]string, error)
SlowFindPath finds the first path in the graph from startNodeId to targetNodeId. Uses recursive DFS. If no path is found, returns nil.
func SlowGetChildren ¶
func SlowGetChildren(stub cached_stub.CachedStubInterface, graphName string, nodeId string, filter ...interface{}) ([]string, error)
SlowGetChildren gets all children in the graph
func SlowGetParents ¶
func SlowGetParents(stub cached_stub.CachedStubInterface, graphName string, nodeId string, filter ...interface{}) ([]string, error)
SlowGetParents gets all parents in the graph