|
|
@ -1,4 +1,4 @@ |
|
|
|
-module(agGeneralGraphs). |
|
|
|
-module(agGraphs). |
|
|
|
-include("eArango.hrl"). |
|
|
|
|
|
|
|
-compile(inline). |
|
|
@ -18,16 +18,19 @@ |
|
|
|
% error:如果有错误,则标记(true),否则(false)。这个回应是错误的。 |
|
|
|
% code:响应代码。 |
|
|
|
% 图表: |
|
|
|
% graph:有关新创建的图的信息 |
|
|
|
% name:图形名称 |
|
|
|
% edgeDefinitions:图形关系的定义数组。每个都有以下类型: |
|
|
|
% orphanCollections:其他顶点集合的数组。这些集合中的文档在此图中没有边。 |
|
|
|
% numberOfShards:为图中的每个新集合创建的分片数。 |
|
|
|
% _id:此图的内部ID值。 |
|
|
|
% _rev:此图的修订版。可用于确保不覆盖对该图的并发修改。 |
|
|
|
% ReplicationFactor:图形中每个新集合使用的复制因子。 |
|
|
|
% isSmart:标记图形是否为SmartGraph(仅限企业版)。 |
|
|
|
% smartGraphAttribute:智能图例中的分片属性名称(仅企业版) |
|
|
|
% graphs: |
|
|
|
% graph : 关于新创建的图的信息 |
|
|
|
% name : 图的名称 |
|
|
|
% edgeDefinitions:图形关系的定义数组。每个都有以下类型: |
|
|
|
% orphanCollections:一组额外的顶点集合。这些集合中的文档在该图中没有边。 |
|
|
|
% numberOfShards:为图中的每个新集合创建的分片数。 |
|
|
|
% _id:此图的内部 id 值。 |
|
|
|
% _rev:此图的修订版。可用于确保不会覆盖对此图的并发修改。 |
|
|
|
% replicationFactor:用于图中每个新集合的复制因子。也可以"satellite"是 SmartGraph的字符串(仅限企业版)。 |
|
|
|
% isSmart:图形是否为 SmartGraph(仅限企业版)。 |
|
|
|
% isDisjoint:图形是否为 Disjoint SmartGraph(仅限企业版)。 |
|
|
|
% smartGraphAttribute:SmartGraph 案例中的分片属性名称(仅限企业版)。 |
|
|
|
% isSatellite:标记图形是否为 SatelliteGraph(仅限企业版)。 |
|
|
|
graphList(PoolNameOrSocket) -> |
|
|
|
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/gharial">>). |
|
|
|
|
|
|
@ -77,12 +80,10 @@ graphList(PoolNameOrSocket) -> |
|
|
|
% errorNum:发生错误的ArangoDB错误号。 |
|
|
|
% errorMessage:为此错误创建的消息。 |
|
|
|
newGraph(PoolNameOrSocket, MapData) -> |
|
|
|
BodyStr = eVPack:encodeBin(MapData), |
|
|
|
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/gharial">>, ?AgDefQuery, ?AgDefHeader, BodyStr). |
|
|
|
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/gharial">>, ?AgDefQuery, ?AgDefHeader, eVPack:encodeBin(MapData)). |
|
|
|
|
|
|
|
newGraph(PoolNameOrSocket, MapData, QueryPars) -> |
|
|
|
BodyStr = eVPack:encodeBin(MapData), |
|
|
|
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/gharial">>, QueryPars, ?AgDefHeader, BodyStr). |
|
|
|
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/gharial">>, QueryPars, ?AgDefHeader, eVPack:encodeBin(MapData)). |
|
|
|
|
|
|
|
% 获取图表 |
|
|
|
% GET /_api/gharial/{graph} |