| 123456789101112131415161718192021222324252627282930 |
- -- 15cypher 目录初始化:Cypher 图操作测试
- create class if not exists /test/aaa/test_graph (
- g_name varchar,
- g_type varchar,
- g_value int,
- indexes(g_name, g_type),
- keys(g_name)
- )
- ;
- create edge type if not exists /test/aaa/connect
- ;
- -- 插入图节点数据
- insert into /test/aaa/test_graph (g_name, g_type, g_value) values ('node_a', 'type_a', 10)
- ;
- insert into /test/aaa/test_graph (g_name, g_type, g_value) values ('node_b', 'type_a', 20)
- ;
- insert into /test/aaa/test_graph (g_name, g_type, g_value) values ('node_c', 'type_b', 30)
- ;
- insert into /test/aaa/test_graph (g_name, g_type, g_value) values ('node_d', 'type_b', 40)
- ;
- insert into /test/aaa/test_graph (g_name, g_type, g_value) values ('node_e', 'type_c', 50)
- ;
|