Guest User

Untitled

a guest
Nov 27th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <script type="application/javascript">
  2.  
  3. sigma.neo4j.cypher(
  4. { url: 'http://192.168.0.20:3306', user: 'root', password: '1234' },
  5. 'MATCH (n) OPTIONAL MATCH (n)-[r]->(m) RETURN n,r,m LIMIT 100',
  6. { container: 'graph-container' } ,
  7. function(s) {
  8. console.log('Number of nodes :'+ s.graph.nodes().length);
  9. console.log('Number of edges :'+ s.graph.edges().length);
  10. }
  11. );
  12.  
  13. // Calling neo4j to get all its relationship type
  14. sigma.neo4j.getTypes(
  15. { url: 'http://192.168.0.20:3306', user: 'root', password: '1234' },
  16. function(types) {
  17. console.log("Relationship types" + types);
  18. }
  19. );
  20.  
  21. // Calling neo4j to get all its node label
  22. sigma.neo4j.getLabels(
  23. { url: 'http://192.168.0.20:3306', user: 'root', password: '1234' },
  24. function(labels) {
  25. console.log("Node labels" + labels);
  26. }
  27. );
Add Comment
Please, Sign In to add comment