-
-
Notifications
You must be signed in to change notification settings - Fork 3
Neo4jCursor Class
dr.dimitru edited this page Jan 23, 2017
·
6 revisions
Returns array of fetched rows. If query was passed with reactive
option - data will be updated each event loop.
- Returns: {[Object]}
db.query("MATCH n RETURN n").fetch();
Move cursor to first item and return it.
- Returns: {[Object]} - Array of data instances or
undefined
if cursor has no items
db.query("MATCH n RETURN n").first();
Get current data instance(s) on cursor.
- Returns: {[Object]} - Array of data instances or
undefined
if cursor has no items
db.query("MATCH n RETURN n").current();
Go to next item on cursor and return it.
- Returns: {[Object]} - Array of data instances or
undefined
if cursor has no items
db.query("MATCH n RETURN n").next();
Go to previous item on cursor and return it.
- Returns: {[Object]} - Array of data instances or
undefined
if cursor has no items
db.query("MATCH n RETURN n").previous();
Iterates thought Neo4j query results. And returns data as data instance(s). This function will move cursor to latest item.
-
callback
{Function} - Callback function, withdata
(asNeo4jData
,Neo4jRelationship
orNeo4jNode
instance(s)),num
,cursor
arguments - Returns: {undefined}
db.query("MATCH n RETURN n").each( (data, i, cursor) => {
data.n.property({updatedAt: +new Date()});
data.n.get();
data.n.delete();
});
Iterates though Neo4j query results. If query was passed with reactive
option - data will be updated each event loop.
-
callback
{Function} - Callback function, withdata
(plain object),num
,cursor
arguments - Returns: {undefined}
db.query("MATCH n RETURN n").forEach( (data, i, cursor) => {
data.n;
});
propertyKeys()
labels()
relationshipTypes()
version()
graph()
queryOne()
querySync()
queryAsync()
query()
cypher()
batch()
transaction()
nodes()
relationship.create()
relationship.get()
constraint.create()
constraint.drop()
constraint.get()
index.create()
index.get()
index.drop()
get()
delete()
update()
degree()
to()
from()
path()
relationships()
property()
properties.get()
properties.set()
properties.delete()
properties.update()
label()
labels.set()
labels.replace()
labels.delete()
index.create()
index.get()
index.drop()