Neo4j
Execute queries and mutations against a Neo4j database
The Modus Neo4j API allows 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. Open an issue if you have ideas on what would make Modus even more powerful for your next app!
Functions
executeQuery
Execute a Neo4j query or mutation using a Neo4j query and parameters.
Name of the connection, as defined in the manifest.
A Neo4j 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.
GetRecordValue
Get the value of a record at a given key, and cast as a type.
The record to get the value from.
The key of the value to get.
The type to cast the value as.
Get
Get the value of a record object at a given key as a string.
The key of the value to get.
AsMap
Convert a record object to a map.
GetProperty
Get the value of an Entity
(Node
, Path
, or Relationship
) property, and
cast as a type.
The entity to get the property from.
The key of the property to get.
The type to cast the property as.
Types
EagerResult
The result of a Neo4j query or mutation.
The keys of the result.
The records of the result.
Record
A record in a Neo4j query result.
The values of the record.
The keys of the record.
RecordValue
A value of a record in a Neo4j query result.
Entity
An interface representing possible entities in a Neo4j query result. Node
,
Relationship
, and Path
implement this interface.
Node
A node in a Neo4j query result.
The ID of the node.
The labels of the node.
The properties of the node.
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.
Path
A path in a Neo4j query result.
The nodes in the path.
The relationships in the path.
PropertyValue
A value of a property in a Neo4j query result.
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.