-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathindex.html
136 lines (92 loc) · 5.54 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Home</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">Home</h1>
<h3> </h3>
<section>
<article><p><a href="https://github.com/RedisGraph/redisgraph.js"><img src="https://img.shields.io/github/license/RedisGraph/redisgraph.js.svg" alt="license"></a>
<a href="https://circleci.com/gh/RedisGraph/redisgraph.js/tree/master"><img src="https://circleci.com/gh/RedisGraph/redisgraph.js/tree/master.svg?style=svg" alt="CircleCI"></a>
<a href="https://github.com/RedisGraph/redisgraph.js/releases/latest"><img src="https://img.shields.io/github/release/RedisGraph/redisgraph.js.svg" alt="GitHub issues"></a>
<a href="https://badge.fury.io/js/redisgraph.js"><img src="https://badge.fury.io/js/redisgraph.js.svg" alt="npm version"></a>
<a href="https://codecov.io/gh/RedisGraph/redisgraph.js"><img src="https://codecov.io/gh/RedisGraph/redisgraph.js/branch/master/graph/badge.svg" alt="Codecov"></a>
<a href="https://snyk.io/test/github/RedisGraph/redisgraph.js?targetFile=package.json"><img src="https://snyk.io/test/github/RedisGraph/redisgraph.js/badge.svg?targetFile=package.json" alt="Known Vulnerabilities"></a></p>
<h1>redisgraph.js</h1>
<p><a href="https://forum.redislabs.com/c/modules/redisgraph"><img src="https://img.shields.io/badge/Forum-RedisGraph-blue" alt="Forum"></a>
<a href="https://discord.gg/gWBRT6P"><img src="https://img.shields.io/discord/697882427875393627?style=flat-square" alt="Discord"></a></p>
<p><a href="https://github.com/RedisLabsModules/redis-graph/">RedisGraph</a> JavaScript Client - <a href="https://redisgraph.github.io/redisgraph.js/">API Docs</a></p>
<hr>
<h2>Deprecation notice</h2>
<h2>This library is deprecated. <a href="https://www.github.com/redis/node-redis">node-redis</a>. It's features have been merged into <a href="https://www.github.com/redis/node-redis">node-redis</a>. Please either install it from npm or the repository.</h2>
<h2>Installation</h2>
<p>Installation is done using the
<a href="https://docs.npmjs.com/getting-started/installing-npm-packages-locally"><code>npm install</code> command</a>:</p>
<pre class="prettyprint source lang-bash"><code>npm install redisgraph.js
</code></pre>
<p>For installing the latest snapshot use</p>
<pre class="prettyprint source lang-bash"><code>npm install github:RedisGraph/redisgraph.js.git
</code></pre>
<h2>Overview</h2>
<h3>Example: Using the JavaScript Client</h3>
<pre class="prettyprint source lang-javascript"><code>const RedisGraph = require("redisgraph.js").Graph;
let graph = new RedisGraph("social");
(async () =>{
await graph.query("CREATE (:person{name:'roi',age:32})");
await graph.query("CREATE (:person{name:'amit',age:30})");
await graph.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]->(b)");
// Match query.
let res = await graph.query("MATCH (a:person)-[:knows]->(:person) RETURN a.name");
while (res.hasNext()) {
let record = res.next();
console.log(record.get("a.name"));
}
console.log(res.getStatistics().queryExecutionTime());
// Match with parameters.
let param = {'age': 30};
res = await graph.query("MATCH (a {age: $age}) return a.name", param);
while (res.hasNext()) {
let record = res.next();
console.log(record.get("a.name"));
}
// Named paths matching.
res = await graph.query("MATCH p = (a:person)-[:knows]->(:person) RETURN p");
while (res.hasNext()) {
let record = res.next();
// See path.js for more path API.
console.log(record.get("p").nodeCount);
}
graph.deleteGraph();
graph.close();
})();
</code></pre>
<h3>Running tests</h3>
<p>A simple test suite is provided, and can be run with:</p>
<pre class="prettyprint source lang-sh"><code>$ npm test
</code></pre>
<p>The tests expect a Redis server with the RedisGraph module loaded to be available at localhost:6379</p>
<h2>License</h2>
<p>redisgraph.js is distributed under the BSD3 license - see <a href="LICENSE">LICENSE</a></p></article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Edge.html">Edge</a></li><li><a href="Graph.html">Graph</a></li><li><a href="Node.html">Node</a></li><li><a href="Path.html">Path</a></li><li><a href="Record.html">Record</a></li><li><a href="ResultSet.html">ResultSet</a></li><li><a href="Statistics.html">Statistics</a></li></ul><h3>Global</h3><ul><li><a href="global.html#Label">Label</a></li><li><a href="global.html#ResultSetColumnTypes">ResultSetColumnTypes</a></li><li><a href="global.html#ResultSetValueTypes">ResultSetValueTypes</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Dec 08 2022 09:52:52 GMT+0000 (Coordinated Universal Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>