-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.html
68 lines (59 loc) · 1.77 KB
/
examples.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
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/highlight.min.js"></script>
<script type="text/javascript" src="javascripts/cypher.js"></script>
<link href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/styles/default.min.css" rel="stylesheet" />
<link href="css/cypher-highlighting.css" rel="stylesheet"/>
<script type="text/javascript">
hljs.registerLanguage("cypher", cypher);
hljs.initHighlightingOnLoad();
</script>
<style>
</style>
</head>
<body>
<h2>Basic Statement</h2>
<pre><code class="cypher">
MATCH (n:Label) - [:REL] -> () RETURN n;
</code></pre>
<h2>Multiple Labels</h2>
<pre><code class="cypher">
MATCH (n:Label1:Label2) - [:REL] -> () RETURN n;
</code></pre>
<h2>CREATE</h2>
<pre><code class="cypher">
CREATE (n:Label {prop1: 'value', prop2: 123});
</code></pre>
<h2>MERGE</h2>
<pre><code class="cypher">
MERGE (n:Label {prop1: 'value', prop2: 123}) - [:REL {}] -> (n:Label {prop1: 'value2'});
</code></pre>
<h2>WITH</h2>
<pre><code class="cypher">
MATCH (n:SomeLabel) - [] -> (q)
WITH q
MATCH (q) - [] -> (r)
RETURN r;
</code></pre>
<h2>COMMENT</h2>
<pre><code class="cypher">
// TEST THE COMMENT
MATCH (n:Label) RETURN n;
</code></pre>
<h2>LITERALS</h2>
<pre><code class="cypher">
MATCH (n:Label) WHERE n.is_a_node = true RETURN n;
</code></pre>
<h2>PREDICATES</h2>
<pre><code class="cypher">
MATCH (n:Label) WHERE n.is_a_node = true RETURN n;
MATCH (n:Label) WHERE n.prop = "foo" RETURN n;
MATCH (n:Label) WHERE n.prop = 'foo' RETURN n;
</code></pre>
<h2>Functions</h2>
<pre><code class="cypher">
MATCH (n:Label) RETURN abs(n.neg_num);
</code></pre>
</body>
</html>