-- 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) ) with nickname='test_graph' ; alter class /test/aaa/test_graph with nickname='test_graph' /** onerror(continue,'already exist') **/ ; create edge type if not exists test.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) ; -- 等待数据写入完成 /** sleep(1s) **/ ;