12match.mql 944 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. -- ============================================================
  2. -- Cypher match 查询测试
  3. -- ============================================================
  4. match (n:test_graph) return n.g_name, n.g_type, n.g_value
  5. /**
  6. onerror(continue,'unsupport single node')
  7. output()
  8. **/
  9. ;
  10. match (n:test_graph) where n.g_value > 25 return n.g_name, n.g_type, n.g_value
  11. /**
  12. onerror(continue)
  13. output()
  14. **/
  15. ;
  16. match (n:test_graph) where n.g_type='type_a' and n.g_value>=10 return n.g_name, n.g_type, n.g_value
  17. /**
  18. onerror(continue)
  19. output()
  20. **/
  21. ;
  22. match (a:test_graph) -[:connect]-> (b:test_graph) return a, b
  23. /**
  24. output()
  25. **/
  26. ;
  27. match (a:test_graph where a.g_name='node_a') -[:connect]-> (b:test_graph) return a, b
  28. /**
  29. onerror(continue)
  30. output()
  31. **/
  32. ;
  33. match (n:test_graph) where n.g_name='node_e' return n.g_name, n.g_type, n.g_value
  34. /**
  35. onerror(continue)
  36. output()
  37. **/
  38. ;
  39. match (n:test_graph) return n.g_name, n.g_value
  40. /**
  41. onerror(continue)
  42. output()
  43. **/
  44. ;