-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (59 loc) · 1.83 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
<!doctype html>
<html>
<title>sPyCy browser demo</title>
<head>
<script src="https://cdn.jsdelivr.net/pyodide/v0.23.0/full/pyodide.js"></script>
<script src="./static/script.js"></script>
<script type="text/javascript">
window.addEventListener("DOMContentLoaded", (event) => {
main();
});
</script>
<link rel="stylesheet" type="text/css" href="./static/style.css">
</head>
<body>
<h1> sPyCy browser demo </h1>
<p> Input openCypher queries and use `ctrl + enter` to execute them! </p>
<p> This project is <a href="https://github.com/aneeshdurg/spycy">open source</a>! </p>
<details>
<summary> Sample Queries </summary>
<code>
<ul>
<li> Create nodes with ids 1 to 5:
<ul>
<li> UNWIND range(1, 5) AS id CREATE (n:Node {id: id}) </li>
</ul>
</li>
<li> Return all nodes:
<ul>
<li> MATCH (n:Node) RETURN n, properties(n) </li>
</ul>
</li>
<li> Return nodes with id > 3:
<ul>
<li> MATCH (n:Node) WHERE n.id > 3 RETURN n, properties(n) </li>
</ul>
</li>
<li> Create a relationship between nodes with even and odd ids:
<ul>
<li> MATCH (n: Node) WHERE n.id % 2 = 0 CREATE (n)-[:EVEN]->(m:Node {id: n.id + 1}) </li>
</ul>
</li>
<li> Return all relationships:
<ul>
<li> MATCH (n:Node)-[r]->(m) RETURN n.id, r, m.id </li>
</ul>
</li>
</ul>
</code>
</details>
<div class="content">
<div id="preload" class="preload">
<code id="progress"></code>
</div>
<div id="loaded" style="display: none;">
<div id="notebook"></div>
</div>
</div>
</body>
</html>