graph-acl
Version:
An ACL module using Graph databases.
3,590 lines (1,105 loc) • 69.3 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Neo4jConnector</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Neo4jConnector</h1>
<section>
<header>
<h2>
Neo4jConnector
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="Neo4jConnector"><span class="type-signature"></span>new Neo4jConnector<span class="signature">(db)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Create an instance of Neo4jConnector.
Examples:
var neo4j = require('node-neo4j');
var acl = require('node-graph-acl');
var db = new neo4j('http://localhost:7474');
var connector = new acl.neo4jConnector(db);
</div>
<h5>This:</h5>
<ul><li>{<a href="Neo4jConnector.html">Neo4jConnector</a>}</li></ul>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>db</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">The database connection string. Format: http://username:password@domain:port</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line21">line 21</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="_getParameters"><span class="type-signature"></span>_getParameters<span class="signature">(object, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get object parameters after extracting all _* parameters.
Examples:
connector._getParameters(node, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>object</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Object. Can be a node, a relationship, or any object.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line626">line 626</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addNodeLabels"><span class="type-signature"></span>addNodeLabels<span class="signature">(nodeId, labels, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Add labels to a node.
Examples:
connector.addNodeLabels(1, ['l1', 'l2'], callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>nodeId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">Node id.</td>
</tr>
<tr>
<td class="name"><code>labels</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last">Labels to add.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line579">line 579</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addNodeProperties"><span class="type-signature"></span>addNodeProperties<span class="signature">(nodeId, properties, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Add properties to a node.
Examples:
connector.addNodeProperties(1, {p1:'v1', p2:'v2'}, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>nodeId</code></td>
<td class="type">
<span class="param-type">String</span>
|
<span class="param-type">Number</span>
</td>
<td class="description last">Node id.</td>
</tr>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Properties to add.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line443">line 443</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addRelationship"><span class="type-signature"></span>addRelationship<span class="signature">(from, to, type, properties, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Create a relationship between two nodes.
Properties can be added to the relationship.
Examples:
connector.addRelationship(1, 2, 'TYPE', {p1:'v1', p2:'v2'}, callback);
connector.addRelationship(1, 2, 'TYPE', callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>from</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">From Node id.</td>
</tr>
<tr>
<td class="name"><code>to</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">To Node id.</td>
</tr>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Relationship Type.</td>
</tr>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Relationship properties.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line251">line 251</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addRelationshipProperties"><span class="type-signature"></span>addRelationshipProperties<span class="signature">(relationshipId, properties, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Add properties to a relationship.
Examples:
connector.addRelationshipProperties(1, {p1:'v1', p2:'v2'}, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>relationshipId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">Relationship id.</td>
</tr>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Properties to add.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line508">line 508</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="createNode"><span class="type-signature"></span>createNode<span class="signature">(labels, properties, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Create a node with given labels and properties.
Examples:
connector.createNode(callback);
connector.createNode(['l1','l2'], callback);
connector.createNode(['l1','l2'], {p1:'v1', p2:'v2'},, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>labels</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last">Node labels.</td>
</tr>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Node properties.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line41">line 41</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="deleteNode"><span class="type-signature"></span>deleteNode<span class="signature">(nodeId, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Delete an existing node.
Examples:
connector.deleteNode(1, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>nodeId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">Node id.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line217">line 217</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="existsNodeWithLabel"><span class="type-signature"></span>existsNodeWithLabel<span class="signature">(label, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Check existence of Nodes with given label.
Examples:
connector.existsNodeWithLabel('Test', callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>label</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Label to search.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line128">line 128</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="existsNodeWithLabelsAndProperties"><span class="type-signature"></span>existsNodeWithLabelsAndProperties<span class="signature">(labels, properties, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Check existence of Nodes with given labels and properties.
Examples:
connector.existsNodeWithLabelsAndProperties('Label', {p1: 'v1', p2: 'v2'}, callback);
connector.existsNodeWithLabelsAndProperties(['Label1', 'Label2'], {p1: 'v1', p2: 'v2'}, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>labels</code></td>
<td class="type">
<span class="param-type">String</span>
|
<span class="param-type">Array</span>
</td>
<td class="description last">Labels to search.</td>
</tr>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Properties to search.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line168">line 168</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="existsNodeWithProperties"><span class="type-signature"></span>existsNodeWithProperties<span class="signature">(properties, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Check existence of Nodes with given properties.
Examples:
connector.existsNodeWithProperties({p1: 'v1', p2: 'v2'}, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Properties to search.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line147">line 147</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="existsRelationshipsBetweenNodes"><span class="type-signature"></span>existsRelationshipsBetweenNodes<span class="signature">(from, to, type, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Check existence of Relationships between two nodes.
Examples:
connector.getRelationshipBetweenNodes(1, 2, callback);
connector.getRelationshipBetweenNodes(1, 2, 'TYPE', callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>from</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">From Node id.</td>
</tr>
<tr>
<td class="name"><code>to</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">To Node id.</td>
</tr>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Relationship Type.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line402">line 402</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getNode"><span class="type-signature"></span>getNode<span class="signature">(nodeId, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get a node.
Examples:
connector.getNode(1, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>nodeId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">Node id.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line74">line 74</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getNodeLabels"><span class="type-signature"></span>getNodeLabels<span class="signature">(nodeId, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get node labels.
Examples:
connector.getNodeLabels(1, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>nodeId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">Node id.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line565">line 565</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getNodeProperties"><span class="type-signature"></span>getNodeProperties<span class="signature">(nodeId, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get an existing node's properties.
Examples:
connector.getNodeProperties(1, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>nodeId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">Node id.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line230">line 230</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getNodeRelationships"><span class="type-signature"></span>getNodeRelationships<span class="signature">(nodeId, options, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get a node relationships.
Examples:
var options = {
types: ['TEST', ...] // optional
direction: 'in' // optional, alternative 'out', defaults to 'all'
}
connector.getNodeRelationships(1, options, callback);
connector.getNodeRelationships(1, {}, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>nodeId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">Node id.</td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Type of relationship: 'in', 'out' or 'all' (Default). Optional.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line338">line 338</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getNodesWithLabel"><span class="type-signature"></span>getNodesWithLabel<span class="signature">(label, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get Nodes with given label.
Examples:
connector.getNodesWithLabel('Test', callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>label</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Label to search.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line87">line 87</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getNodesWithLabelsAndProperties"><span class="type-signature"></span>getNodesWithLabelsAndProperties<span class="signature">(labels, properties, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get Nodes with given labels and properties.
Examples:
connector.getNodesWithLabelsAndProperties('Label', {p1: 'v1', p2: 'v2'}, callback);
connector.getNodesWithLabelsAndProperties(['Label1', 'Label2'], {p1: 'v1', p2: 'v2'}, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>labels</code></td>
<td class="type">
<span class="param-type">String</span>
|
<span class="param-type">Array</span>
</td>
<td class="description last">Labels to search.</td>
</tr>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Properties to search.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line115">line 115</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getNodesWithProperties"><span class="type-signature"></span>getNodesWithProperties<span class="signature">(properties, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get Nodes with given properties.
Examples:
connector.getNodesWithProperties({p1: 'v1', p2: 'v2'}, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>properties</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Properties to search.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line100">line 100</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getRelationship"><span class="type-signature"></span>getRelationship<span class="signature">(relationshipId, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get a relationship.
Examples:
connector.getRelationship(1, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>relationshipId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">Relationship id.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line271">line 271</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getRelationshipProperties"><span class="type-signature"></span>getRelationshipProperties<span class="signature">(relationshipId, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get a relationship properties.
Examples:
connector.getRelationshipProperties(1, callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>relationshipId</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">Relationship id.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line312">line 312</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getRelationshipsBetweenNodes"><span class="type-signature"></span>getRelationshipsBetweenNodes<span class="signature">(from, to, type, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Get Relationships between two nodes.
Examples:
connector.getRelationshipBetweenNodes(1, 2, callback);
connector.getRelationshipBetweenNodes(1, 2, 'TYPE', callback);
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>from</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">From Node id.</td>
</tr>
<tr>
<td class="name"><code>to</code></td>
<td class="type">
<span class="param-type">Number</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">To Node id.</td>
</tr>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Relationship Type.</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback called when finished.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="neo4j.js.html">connectors/neo4j.js</a>, <a href="neo4j.js.html#line354">line 354</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeNodeLabels"><span class="type-signature"></span>removeNodeLabels<span class="signature">(nodeId, labels, callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Remove a label from a node.
Examples:
connector.removeNodeLabel(1, 'l1', callback);
connector.removeNodeLabel(1, ['l1', 'l2