Neo4j APIs
Execute queries and mutations against a Neo4j database
While each Modus SDK offers similar capabilities, the APIs and usage may vary between languages.
Modus Neo4j APIs documentation is available on the following pages:
- AssemblyScript Neo4j APIs
- Go Neo4j APIs (this page)
The Modus Neo4j APIs allow you to run queries and mutations against a Neo4j database.
Import
To begin, import the neo4j
package from the SDK:
Neo4j APIs
The APIs in the neo4j
package are below, organized by category.
We’re constantly introducing new APIs through ongoing development with early users. Please open an issue if you have ideas on what would make Modus even more powerful for your next app!
Functions
ExecuteQuery
Executes a Cypher query on the Neo4j database.
Name of the connection, as defined in the manifest.
A Neo4j Cypher query to execute.
A map of parameters to pass to the query.
Optional arguments to pass to the query. Specify the database name using the
WithDbName
option.
GetProperty
Get a property from an entity at a given key and cast or decode it to a specific type.
The type to cast or decode the value to.
The entity to get the value from.
The key of the value to get.
GetRecordValue
Get a value from a record at a given key and cast or decode it to a specific type.
The type to cast or decode the value to.
The record to get the value from.
The key of the value to get.
Types
EagerResult
The result of a Neo4j query or mutation.
The keys of the result.
The records of the result.
Entity
An interface representing possible entities in a Neo4j query result.
Returns the ID of the entity.
Returns the properties of the entity.
Node
A node in a Neo4j query result.
The ID of the node.
The labels of the node.
The properties of the node.
Returns the ID of the node.
Returns the properties of the node.
Path
A path in a Neo4j query result.
The nodes in the path.
The relationships in the path.
Point2D
A 2D point in a Neo4j query result.
The X coordinate of the point.
The Y coordinate of the point.
The spatial reference ID of the point.
Point3D
A 3D point in a Neo4j query result.
The X coordinate of the point.
The Y coordinate of the point.
The Z coordinate of the point.
The spatial reference ID of the point.
PropertyValue
A type constraint for retrieving property values from a Neo4j entity.
Record
A record in a Neo4j query result.
The values of the record.
The keys of the record.
Get the value of a record at a given key as a JSON encoded string.
Usually, you should use the GetRecordValue[T](key)
function instead of this method.
Convert the record to a map of keys and JSON encoded string values.
RecordValue
A type constraint for retrieving values from a Neo4j record.
Relationship
A relationship in a Neo4j query result.
The ID of the relationship.
The ID of the start node.
The ID of the end node.
The type of the relationship.
The properties of the relationship.
Returns the ID of the node.
Returns the properties of the node.
Was this page helpful?