Documentation
¶
Overview ¶
Package opencypher is an in-process openCypher engine over an in-memory property graph.
Supported: MATCH, OPTIONAL MATCH, WHERE, CREATE, MERGE (ON CREATE/ON MATCH SET), SET, REMOVE, DELETE, DETACH DELETE, WITH, UNWIND, RETURN with DISTINCT, ORDER BY, SKIP, LIMIT, parameters, variable-length relationships, CASE, list/map expressions, the common scalar functions and the count, collect, sum, avg, min and max aggregates. Not supported: CALL, UNION, FOREACH, LOAD CSV, pattern predicates in WHERE, list comprehensions, shortestPath, constraints and indexes.
Index ¶
Constants ¶
const ( CodeMalformedQuery = "MalformedQueryException" CodeUnsupported = "UnsupportedOperationException" CodeConstraintViolation = "ConstraintViolationException" CodeInvalidParameter = "InvalidParameterException" )
Error codes match the Neptune openCypher HTTP API.
const IDProperty = "~id"
IDProperty is the property key that sets or reads an entity id.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph is a thread-safe in-memory property graph with an openCypher executor.
type Node ¶
type Node struct {
Props map[string]any
ID string
Labels []string
// contains filtered or unexported fields
}
Node is a labelled vertex.
type Rel ¶
type Rel struct {
Props map[string]any
ID string
Type string
Start string
End string
// contains filtered or unexported fields
}
Rel is a directed, typed edge.
type Result ¶
Result is the table produced by RETURN; a query with no RETURN has no columns.
func (*Result) MarshalJSON ¶
MarshalJSON renders the rows as Neptune's openCypher results array (entities use ~id/~entityType shapes).