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 (this page)
- Go Neo4j APIs
The Modus Neo4j APIs allow you to run queries and mutations against a Neo4j database.
Import
To begin, import the neo4j
namespace from the SDK:
Neo4j APIs
The APIs in the neo4j
namespace 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.
The parameters to pass to the query.
An optional database name to use. Defaults to “neo4j” if not provided.
Types
EagerResult
The result of a Neo4j query.
The keys of the result.
The records of the result.
Entity
An abstract class representing possible entities in a Neo4j query result.
The ID of the entity.
The properties of the entity.
Node
A node in a Neo4j query result.
The ID of the node.
The properties of the node.
The labels 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.
Record
A record in a Neo4j query result.
The keys of the record.
The values of the record.
Get a value from a record at a given key as a JSON encoded string.
Usually, you should use getValue<T>(key)
instead of this method.
Get a value from a record at a given key and cast or decode it to a specific type.
Convert the record to a map of keys and JSON encoded string values.
Relationship
A relationship in a Neo4j query result.
The ID of the relationship.
The properties of the relationship.
The ID of the start node.
The ID of the end node.
The type of the relationship.
Was this page helpful?