19
19
20
20
< h1 class ="page-title "> Home</ h1 >
21
21
22
-
23
22
24
23
25
24
26
-
25
+
26
+
27
27
28
28
29
29
< h3 > </ h3 >
@@ -37,7 +37,7 @@ <h3> </h3>
37
37
38
38
39
39
40
-
40
+
41
41
42
42
43
43
@@ -48,7 +48,6 @@ <h3> </h3>
48
48
< 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 >
49
49
< a href ="https://badge.fury.io/js/redisgraph.js "> < img src ="https://badge.fury.io/js/redisgraph.js.svg " alt ="npm version "> </ a >
50
50
< 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 >
51
- < a href ="https://lgtm.com/projects/g/RedisGraph/redisgraph.js/context:javascript "> < img src ="https://img.shields.io/lgtm/grade/javascript/g/RedisGraph/redisgraph.js.svg?logo=lgtm&logoWidth=18 " alt ="Language grade: JavaScript "> </ a >
52
51
< 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 >
53
52
< h1 > redisgraph.js</ h1 >
54
53
< p > < a href ="https://forum.redislabs.com/c/modules/redisgraph "> < img src ="https://img.shields.io/badge/Forum-RedisGraph-blue " alt ="Forum "> </ a >
@@ -75,23 +74,23 @@ <h3>Example: Using the JavaScript Client</h3>
75
74
await graph.query("CREATE (:person{name:'roi',age:32})");
76
75
await graph.query("CREATE (:person{name:'amit',age:30})");
77
76
await graph.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]-> (b)");
78
-
77
+
79
78
// Match query.
80
79
let res = await graph.query("MATCH (a:person)-[:knows]-> (:person) RETURN a.name");
81
80
while (res.hasNext()) {
82
81
let record = res.next();
83
82
console.log(record.get("a.name"));
84
83
}
85
84
console.log(res.getStatistics().queryExecutionTime());
86
-
85
+
87
86
// Match with parameters.
88
87
let param = {'age': 30};
89
88
res = await graph.query("MATCH (a {age: $age}) return a.name", param);
90
89
while (res.hasNext()) {
91
90
let record = res.next();
92
91
console.log(record.get("a.name"));
93
92
}
94
-
93
+
95
94
// Named paths matching.
96
95
res = await graph.query("MATCH p = (a:person)-[:knows]-> (:person) RETURN p");
97
96
while (res.hasNext()) {
@@ -101,7 +100,7 @@ <h3>Example: Using the JavaScript Client</h3>
101
100
}
102
101
graph.deleteGraph();
103
102
graph.close();
104
-
103
+
105
104
})();
106
105
107
106
</ code > </ pre >
@@ -134,4 +133,4 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Edge.html
134
133
< script > prettyPrint ( ) ; </ script >
135
134
< script src ="scripts/linenumber.js "> </ script >
136
135
</ body >
137
- </ html >
136
+ </ html >
0 commit comments