Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>CREATE ( blagus { firstname: 'Alexander', lastname: 'Blagus'} ) CREATE (celso { firstname: 'Celso', lastname: 'Oliveira'}), (celso) - [r:WORKS_WITH] - &gt; (blagus) return blagus, celso, r </code></pre> <p>In this example there are 2 distinct queries, the first one creates a node with 2 properties. The second one does the exact same thing as the first one plus creates a relationships from celso to blagus</p> <pre><code>START n=node(*) RETURN "The number of nodes in your graph is "+count(*)+" !" as total; </code></pre> <p>Returns a variable named total with the value 'The number of nodes in your graph is 2!', it´s basically the same as select count(*)</p> <pre><code>START me=node(1) MATCH me&lt;--friend RETURN friend </code></pre> <p>Assuming we are using this simple database as example, this would return the node celso considering the direction of the relationship </p> <pre><code> START n=node(*) MATCH n WHERE n.firstname! ='Alexander' RETURN n </code></pre> <p>This query matches all nodes with the property firstname equals to Alexander. Please note that the “!” symbol make sures that only the nodes which have such property are going to be taken into consideration, preventing an error.</p> <pre><code>START n=node(*) MATCH n WHERE n.firstname! ='Alexander' SET n.age = '34' RETURN n </code></pre> <p>This query matches the node which has the property firstname Alexander and adds another property "age" with the value "34"</p> <pre><code>START n = node(*) MATCH n WHERE n.firstname! = "Geraldo" DELETE n </code></pre> <p>This query matches all nodes with the firstname equals to "Geraldo" and deletes them.</p> <pre><code>START n = node(*) MATCH n-[r]-() DELETE n, r </code></pre> <p>This command gets all nodes and relationships and deletes them.</p> <p>Hope it Helps!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload