语句失败后,没有其他语句可以成功。
请参阅以下示例。
agens=# create graph graph;
CREATE GRAPH
agens=# create vlabel v;
CREATE VLABEL
agens=# create unique property index on v ( id );
CREATE PROPERTY INDEX
agens=# begin transaction;
BEGIN
agens=# create (:v{id:1});
GRAPH WRITE (INSERT VERTEX 1, INSERT EDGE 0)
agens=# create (:v{id:1});
ERROR: duplicate key value violates unique constraint "v_id_idx"
DETAIL: Key ((properties.'id'::text))=(1) already exists.
agens=# create (:v{id:2});
ERROR: current transaction is aborted, commands ignored until end of transaction block
agens=# commit;
ROLLBACK
agens=# match (n:v) return n;
n
---
(0 rows)
如何中止 AgnsGraph 上的失败语句?