Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Latest commit

 

History

History
133 lines (83 loc) · 3.56 KB

Node.md

File metadata and controls

133 lines (83 loc) · 3.56 KB

« Documentation Home

Node Class

Node objects represent nodes in neo4j. They inherit from the Base class.

Properties

Methods

Constructor

The Node constructor is internal. Objects are instantiated by various library functions, for example Graph.getNode.

Properties

data

Inherited from Base.data

id

Inherited from Base.id

Methods

createRelationshipFrom

Node.createRelationshipFrom ( [Batch,] Node node, String type, Function callback )
Node.createRelationshipFrom ( [Batch,] Node node, String type, Object data, Function callback )
Node.createRelationshipFrom ( [Batch,] String|Number nodeId, String type, Function callback )
Node.createRelationshipFrom ( [Batch,] String|Number nodeId, String type, Object data, Function callback )

Creates a new relationship from the node represented by node or nodeId arguments to 'this' node.

node

  • The Node from which the relationship will be created to 'this' Node.

nodeId

  • Instead of supplying a Node object, a node ID can be provided as a string or a number.

type

  • The relationship type.

data

  • Allows properties to be set on the relationship at the time of creation.

callback

  • Signature: Function (error, relationship)

createRelationshipTo

Identical to createRelationshipFrom except that the relationship direction is reversed.

deleteProperties

Inherited from Base.deleteProperties

getAllRelationships

Node.getAllRelationships ( [Batch,] Function callback )
Node.getAllRelationships ( [Batch,] String type, Function callback )
Node.getAllRelationships ( [Batch,] Array types, Function callback )

DESCRIPTION

type

  • Limits request to only relationships of one type.

types

  • An array of strings which limit the request to only relationships with types listed in types.

callback

  • Signature: Function (error, relationships)
    • relationships An array of Relationship objects. If no relationships are found, relationships.length === 0.

getIncomingRelationships

Identical to getAllRelationships except that only incoming relationships are requested.

getOutgoingRelationships

Identical to getAllRelationships except that only outgoing relationships are requested.

index

Inherited from Base.index

refreshProperties

Inherited from Base.refreshProperties

removeFromIndex

Inherited from Base.removeFromIndex

replaceAllProperties

Inherited from Base.replaceAllProperties

setProperties

Inherited from Base.setProperties

setProperty

Inherited from Base.setProperty

valueOf

Inherited from Base.valueOf