Created
June 24, 2013 23:18
-
-
Save peterneubauer/5854610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= 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