【发布时间】:2019-03-03 07:46:17
【问题描述】:
为了确保我的边缘集合中的唯一边缘,我可以索引_from 和_to 字段,如documentation 中提到的那样
db.edges.ensureIndex({ type: "hash", fields: [ "_from", "_to" ], unique: true });
以上操作只能从arangosh进行。但是,我正在编写一个设置函数,该函数应该主要通过 HTTP API 创建所有必需的顶点和边集合。我需要知道如何通过AQL 或 HTTP Api 执行相同的操作。
【问题讨论】: