Skip to content

Instantly share code, notes, and snippets.

@peterneubauer
Created June 24, 2013 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterneubauer/5854610 to your computer and use it in GitHub Desktop.
Save peterneubauer/5854610 to your computer and use it in GitHub Desktop.
= Neo4j und Javascript =
// console
[source,cypher]
----
CREATE (movie:Movie {title:"Matrix", year: 1999}),
(movie)<-[:ACTED_IN {role:"Neo"}]-(:Actor {name:"Keanu Reeves", age: 48}),
(movie)<-[:DIRECTED]-(:Director {name:"Wachowski"}),
(movie)<-[:RATED {stars: 5}]-(:User {login:"Michael"})
RETURN 1;
----
Relationships created: 3
Properties set: 8
Labels added: 4
// graph:erster_graph
[source,cypher]
----
MATCH (m:Movie)<-[r:ACTED_IN]-(a:Actor)
RETURN m.title, r.role, a.name;
----
1 row
[source,cypher]
----
MATCH (n:Movie)-[r]-(e) RETURN n,(TYPE(r)), e;
----
3 row
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment