瀏覽代碼

重命令agHttpCli to AgVstCli

master
SisMaker 4 年之前
父節點
當前提交
e6bfa3e33b
共有 39 個檔案被更改,包括 290 行新增290 行删除
  1. +4
    -4
      README.md
  2. +16
    -16
      src/agApi/agAdminMonitor.erl
  3. +5
    -5
      src/agApi/agAnalyzers.erl
  4. +20
    -20
      src/agApi/agAqls.erl
  5. +7
    -7
      src/agApi/agAsyncResultHandling.erl
  6. +3
    -3
      src/agApi/agBulkImportExport.erl
  7. +5
    -5
      src/agApi/agCluster.erl
  8. +28
    -28
      src/agApi/agCollections.erl
  9. +5
    -5
      src/agApi/agDbMgr.erl
  10. +25
    -25
      src/agApi/agDocuments.erl
  11. +1
    -1
      src/agApi/agEdges.erl
  12. +1
    -1
      src/agApi/agEndPoints.erl
  13. +22
    -22
      src/agApi/agFoxxServices.erl
  14. +44
    -44
      src/agApi/agGeneralGraphs.erl
  15. +6
    -6
      src/agApi/agHotBackup.erl
  16. +16
    -16
      src/agApi/agIndexes.erl
  17. +14
    -14
      src/agApi/agMiscFuns.erl
  18. +2
    -2
      src/agApi/agRepairJobs.erl
  19. +30
    -30
      src/agApi/agReplication.erl
  20. +5
    -5
      src/agApi/agTasks.erl
  21. +6
    -6
      src/agApi/agTransactions.erl
  22. +14
    -14
      src/agApi/agUserMgr.erl
  23. +8
    -8
      src/agApi/agViews.erl
  24. +0
    -0
      src/agVstCli/agAgencyPoolMgrExm.erl
  25. +0
    -0
      src/agVstCli/agAgencyPoolMgrIns.erl
  26. +0
    -0
      src/agVstCli/agAgencyPool_sup.erl
  27. +0
    -0
      src/agVstCli/agAgencyUtils.erl
  28. +0
    -0
      src/agVstCli/agHttpProtocol.erl
  29. +0
    -0
      src/agVstCli/agKvsToBeam.erl
  30. +0
    -0
      src/agVstCli/agMiscUtils.erl
  31. +0
    -0
      src/agVstCli/agSslAgencyExm.erl
  32. +0
    -0
      src/agVstCli/agSslAgencyIns.erl
  33. +0
    -0
      src/agVstCli/agTcpAgencyExm.erl
  34. +0
    -0
      src/agVstCli/agTcpAgencyIns.erl
  35. +0
    -0
      src/agVstCli/agVstAgencyExm.erl
  36. +0
    -0
      src/agVstCli/agVstAgencyIns.erl
  37. +1
    -1
      src/agVstCli/agVstCli.erl
  38. +0
    -0
      src/agVstCli/vst.erl
  39. +2
    -2
      src/user_default.erl

+ 4
- 4
README.md 查看文件

@ -4,8 +4,8 @@
# Feature
Efficient, fast and easy to use.
1. To make this driver as efficient as possible, customizations encapsulate an HTTP1.1 client(agHttpCli) with connection pooling.
Comparisons between packaged agHttpCli and similar HTTP client tests are available:[Address](https://github.com/SisMaker/httpc_bench)
1. To make this driver as efficient as possible, customizations encapsulate an HTTP1.1 client(agVstCli) with connection pooling.
Comparisons between packaged agVstCli and similar HTTP client tests are available:[Address](https://github.com/SisMaker/httpc_bench)
2. This driver can use connection pooling or simply establish multiple connections in a single process (non-connection pooling mode) for various data operations.
Synchronous and asynchronous operations are supported when using connection pooling,
and you need to save the requestId extra if you want to use asynchronous operations Waiting for the received data to return,
@ -28,13 +28,13 @@
revar3: rebar3 shell
Non-connection pooling mode
Make a connection first
{ok, Socket} = agHttpCli:connect([]). %% Use default Settings
{ok, Socket} = agVstCli:connect([]). %% Use default Settings
%% Then you can then call various apis using Socket as the first argument
agMgrDb:curDbInfo(Socket).
Connection pooling mode
application:ensure_all_started(erlArango). %% start app
agHttpCli:startPool(poolName, [], []). %% start pool
agVstCli:startPool(poolName, [], []). %% start pool
%% Then you can then invoke various apis using poolName as the first argument
agMgrDb:curDbInfo(poolName).

+ 16
- 16
src/agApi/agAdminMonitor.erl 查看文件

@ -34,12 +34,12 @@
% 400up或level指定了无效值
% 500
getAdminLog(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/log">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/log">>, [], undefined).
getAdminLog(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_admin/log", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_admin/log/level
@ -48,7 +48,7 @@ getAdminLog(PoolNameOrSocket, QueryPars) ->
% 200
% 500
getAdminLogLevel(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/log/level">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/log/level">>, [], undefined).
%
% PUT /_admin/log/level
@ -110,7 +110,7 @@ getAdminLogLevel(PoolNameOrSocket) ->
% 500
modifyAdminLogLevel(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_admin/log/level">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_admin/log/level">>, [], BodyStr).
%
% GET /_admin/statistics
@ -180,7 +180,7 @@ modifyAdminLogLevel(PoolNameOrSocket, MapData) ->
% 线
% 线
getAdminProps(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/statistics">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/statistics">>, [], undefined).
%
%
@ -214,7 +214,7 @@ getAdminProps(PoolNameOrSocket) ->
% codeHTTP状态码
% false
getAdminStatisticsDesc(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/statistics-description">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/statistics-description">>, [], undefined).
% TLS
% TLS数据的摘要
@ -233,7 +233,7 @@ getAdminStatisticsDesc(PoolNameOrSocket) ->
%
% 200API将返回HTTP 200
getAdminTLS(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/tls">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/tls">>, [], undefined).
% TLS数据的重新加载并返回摘要永久链接
% TLS数据CA
@ -244,7 +244,7 @@ getAdminTLS(PoolNameOrSocket) ->
% 200API将返回HTTP 200
% 403使APIHTTP 403 FORBIDDEN
triggerAdminTLS(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/server/tls">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/server/tls">>, [], undefined).
%
% GET /_admin/metrics
@ -255,7 +255,7 @@ triggerAdminTLS(PoolNameOrSocket) ->
% 200
% 404使--server.export-metrics-api false API API
getAdminMetrics(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/metrics">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/metrics">>, [], undefined).
%
@ -267,7 +267,7 @@ getAdminMetrics(PoolNameOrSocket) ->
%
% 200API将返回HTTP 200
getAdminServerMode(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/mode">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/mode">>, [], undefined).
% ID
% ID
@ -277,7 +277,7 @@ getAdminServerMode(PoolNameOrSocket) ->
% 200
% 500
getAdminServerId(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/id">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/id">>, [], undefined).
%
% GET /_admin/server/role
@ -294,7 +294,7 @@ getAdminServerId(PoolNameOrSocket) ->
% errorNum
% [ SINGLEPRIMARYSECONDARYAGENTUNDEFINED ]
getAdminServerRole(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/role">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/role">>, [], undefined).
%
@ -305,7 +305,7 @@ getAdminServerRole(PoolNameOrSocket) ->
% 200API将返回HTTP 200
% 503HTTP 503
getAdminServerAvailability(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/availability">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/availability">>, [], undefined).
% DBserver
%
@ -318,7 +318,7 @@ getAdminServerAvailability(PoolNameOrSocket) ->
% 403
getAdminClusterProps(PoolNameOrSocket, DBserver) ->
Path = <<"/_admin/clusterStatistics?DBserver=", (agMiscUtils:toBinary(DBserver))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
% Permalink
%
@ -349,7 +349,7 @@ getAdminClusterProps(PoolNameOrSocket, DBserver) ->
%
% 200
getAdminClusterHealth(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/cluster/health">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/cluster/health">>, [], undefined).
%
% POST /_admin/routing/reload
@ -357,4 +357,4 @@ getAdminClusterHealth(PoolNameOrSocket) ->
%
% 200
reloadAdminRouting(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/routing/reload">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/routing/reload">>, [], undefined).

+ 5
- 5
src/agApi/agAnalyzers.erl 查看文件

@ -26,7 +26,7 @@
% 403使
newAnalyzer(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/analyzer">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/analyzer">>, [], BodyStr).
%
% GET /_api/analyzer/{analyzer-name}
@ -42,7 +42,7 @@ newAnalyzer(PoolNameOrSocket, MapData) ->
% 404
getAnalyzer(PoolNameOrSocket, AnalyzerName) ->
Path = <<"/_api/analyzer/", AnalyzerName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_api/analyzer
@ -54,7 +54,7 @@ getAnalyzer(PoolNameOrSocket, AnalyzerName) ->
%
% 200
getAnalyzerList(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/analyzer">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/analyzer">>, [], undefined).
%
% DELETE /_api/analyzer/{analyzer-name}
@ -74,9 +74,9 @@ getAnalyzerList(PoolNameOrSocket) ->
% 409使
delAnalyzer(PoolNameOrSocket, AnalyzerName) ->
Path = <<"/_api/analyzer/", AnalyzerName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delAnalyzer(PoolNameOrSocket, AnalyzerName, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/analyzer/", AnalyzerName/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).

+ 20
- 20
src/agApi/agAqls.erl 查看文件

@ -86,7 +86,7 @@
% 405使HTTP方法HTTP 405
newCursor(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/cursor">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/cursor">>, [], BodyStr).
%
@ -105,7 +105,7 @@ newCursor(PoolNameOrSocket, MapData) ->
% 404使HTTP 404
nextCursor(PoolNameOrSocket, CursorId) ->
Path = <<"/_api/cursor/", (agMiscUtils:toBinary(CursorId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
% DELETE /_api/cursor/{cursor-identifier}
@ -119,7 +119,7 @@ nextCursor(PoolNameOrSocket, CursorId) ->
% 404404使
delCursor(PoolNameOrSocket, CursorId) ->
Path = <<"/_api/cursor/", (agMiscUtils:toBinary(CursorId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
% AQL查询的HTTP接口
%
@ -155,7 +155,7 @@ delCursor(PoolNameOrSocket, CursorId) ->
% 404访HTTP 404
explainQuery(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/explain">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/explain">>, [], BodyStr).
% AQL查询并返回有关它的信息
% POST /_api/query
@ -167,7 +167,7 @@ explainQuery(PoolNameOrSocket, MapData) ->
% 400HTTP 400JSON对象中的错误详细信息
parseQuery(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/query">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/query">>, [], BodyStr).
%
% ArangoDB具有HTTP接口AQL查询列表和慢速AQL查询列表使APIHTTP请求的数据库中启用查询跟踪
@ -185,7 +185,7 @@ parseQuery(PoolNameOrSocket, MapData) ->
% 200
% 400HTTP 400
getQueryProps(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query/properties">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query/properties">>, [], undefined).
% AQL查询跟踪的配置
% PUT /_api/query/properties
@ -203,7 +203,7 @@ getQueryProps(PoolNameOrSocket) ->
% 400HTTP 400
changeQueryProps(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/query/properties">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/query/properties">>, [], BodyStr).
% AQL查询的列表
% GET /_api/query/current
@ -219,7 +219,7 @@ changeQueryProps(PoolNameOrSocket, MapData) ->
% 200
% 400HTTP 400
currentQuery(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query/current">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query/current">>, [], undefined).
% AQL查询的列表
@ -237,7 +237,7 @@ currentQuery(PoolNameOrSocket) ->
% 200
% 400HTTP 400
getSlowQuery(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query/slow">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query/slow">>, [], undefined).
% AQL查询列表
% DELETE /_api/query/slow
@ -246,7 +246,7 @@ getSlowQuery(PoolNameOrSocket) ->
% 200HTTP 200
% 400使HTTP 400
delSlowQuery(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, <<"/_api/query/slow">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, <<"/_api/query/slow">>, [], undefined).
%
@ -263,7 +263,7 @@ delSlowQuery(PoolNameOrSocket) ->
% 404ID的查询时HTTP 404
killQuery(PoolNameOrSocket, QueryId) ->
Path = <<"/_api/query/", (agMiscUtils:toBinary(QueryId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
% AQL查询结果缓存的HTTP接口
% AQL查询结果缓存的API方法
@ -284,7 +284,7 @@ killQuery(PoolNameOrSocket, QueryId) ->
% 200
% 400HTTP 400
getQueryCaches(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query-cache/entries">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query-cache/entries">>, [], undefined).
% AQL查询结果缓存中的所有结果
% DELETE /_api/query-cache
@ -293,7 +293,7 @@ getQueryCaches(PoolNameOrSocket) ->
% 200HTTP 200
% 400使HTTP 400
clearQueryCaches(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, <<"/_api/query-cache">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, <<"/_api/query-cache">>, [], undefined).
% AQL查询结果缓存的全局配置
% GET /_api/query-cache/properties
@ -307,7 +307,7 @@ clearQueryCaches(PoolNameOrSocket) ->
% 200
% 400HTTP 400
getQCacheProps(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query-cache/properties">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/query-cache/properties">>, [], undefined).
% AQL查询结果缓存属性
% PUT /_api/query-cache/properties
@ -324,7 +324,7 @@ getQCacheProps(PoolNameOrSocket) ->
% 400HTTP 400
changeQCacheProps(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/query-cache/properties">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/query-cache/properties">>, [], BodyStr).
% AQL用户功能管理固定链接
% AQL用户功能的ArangoDB HTTP接口的简介AQL用户功能是一种使用用户定义的JavaScript代码扩展ArangoDB查询语言AQL
@ -354,7 +354,7 @@ changeQCacheProps(PoolNameOrSocket, MapData) ->
% errorMessage
newUserFun(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/aqlfunction">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/aqlfunction">>, [], BodyStr).
% AQL用户功能
% DELETE /_api/aqlfunction/{name}
@ -381,12 +381,12 @@ newUserFun(PoolNameOrSocket, MapData) ->
% errorMessage
delUserFun(PoolNameOrSocket, UserFunName) ->
Path = <<"/_api/aqlfunction/", (agMiscUtils:toBinary(UserFunName))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delUserFun(PoolNameOrSocket, UserFunName, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/aqlfunction/", (agMiscUtils:toBinary(UserFunName))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
% AQL用户功能
% GET /_api/aqlfunction
@ -407,12 +407,12 @@ delUserFun(PoolNameOrSocket, UserFunName, QueryPars) ->
% errorNum
% errorMessage
getUserFuns(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/aqlfunction">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/aqlfunction">>, [], undefined).
getUserFuns(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/aqlfunction", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).

+ 7
- 7
src/agApi/agAsyncResultHandling.erl 查看文件

@ -68,7 +68,7 @@
% 404404x-arango-async-id HTTP标头
getAsyncJobRet(PoolNameOrSocket, JodId) ->
Path = <<"/_api/job/", (agMiscUtils:toBinary(JodId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
@ -82,7 +82,7 @@ getAsyncJobRet(PoolNameOrSocket, JodId) ->
% 404404x-arango-async-id HTTP标头
cancelAsyncJob(PoolNameOrSocket, JodId) ->
Path = <<"/_api/job/", (agMiscUtils:toBinary(JodId))/binary, "/cancel">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
% DELETE /_api/job/{type}#by-type
@ -100,12 +100,12 @@ cancelAsyncJob(PoolNameOrSocket, JodId) ->
% 404type为job-idid的异步作业404
delAsyncJobRet(PoolNameOrSocket, TypeOrJodId) ->
Path = <<"/_api/job/", (agMiscUtils:toBinary(TypeOrJodId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delAsyncJobRet(PoolNameOrSocket, TypeOrJodId, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/job/", (agMiscUtils:toBinary(TypeOrJodId))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
%
% GET /_api/job/{job-id}
@ -118,7 +118,7 @@ delAsyncJobRet(PoolNameOrSocket, TypeOrJodId, QueryPars) ->
% 404404
getAsyncJobStatus(PoolNameOrSocket, JodId) ->
Path = <<"/_api/job/", (agMiscUtils:toBinary(JodId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
% ID
% GET /_api/job/{type}#by-type
@ -132,9 +132,9 @@ getAsyncJobStatus(PoolNameOrSocket, JodId) ->
% 400type或值无效
getAsyncJobList(PoolNameOrSocket, Type) ->
Path = <<"/_api/job/", (agMiscUtils:toBinary(Type))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
getAsyncJobList(PoolNameOrSocket, Type, Count) ->
Path = <<"/_api/job/", (agMiscUtils:toBinary(Type))/binary, "?count=", (agMiscUtils:toBinary(Count))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).

+ 3
- 3
src/agApi/agBulkImportExport.erl 查看文件

@ -59,7 +59,7 @@ docImport(PoolNameOrSocket, ListOfList, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/import", QueryBinary/binary>>,
BodyStr = <<<<(jiffy:encode(OneList))/binary, "\n">> || OneList <- ListOfList>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
% JSON导入文档
% POST /_api/import#json
@ -109,7 +109,7 @@ jsonImport(PoolNameOrSocket, MapDataList, QueryPars) ->
end,
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/import", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
% ------->
% JSON文档
@ -230,4 +230,4 @@ jsonImport(PoolNameOrSocket, MapDataList, QueryPars) ->
docExport(PoolNameOrSocket, CollName, MapData) ->
Path = <<"/_api/export?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).

+ 5
- 5
src/agApi/agCluster.erl 查看文件

@ -25,7 +25,7 @@
% 200
% 500
serverId(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/id">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/id">>, [], undefined).
%
% GET /_admin/server/role
@ -42,7 +42,7 @@ serverId(PoolNameOrSocket) ->
% errorNum
% role[ SINGLECOORDINATORPRIMARYSECONDARYAGENTUNDEFINED ]
serverRole(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/role">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/server/role">>, [], undefined).
%
% DB-Server的统计信息
@ -55,7 +55,7 @@ serverRole(PoolNameOrSocket) ->
% 403
clusterStats(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/clusterStatistics", QueryBinary/binary>>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/clusterStatistics", QueryBinary/binary>>, [], undefined).
%
% GET /_admin/cluster/health
@ -85,7 +85,7 @@ clusterStats(PoolNameOrSocket, QueryPars) ->
%
% 200
clusterHealth(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/cluster/health">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/cluster/health">>, [], undefined).
%
% PUT /_admin/cluster/maintenance
@ -97,7 +97,7 @@ clusterHealth(PoolNameOrSocket) ->
% 501
% 504
setClusterMaintenance(PoolNameOrSocket, OnOrOff) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_admin/cluster/maintenance">>, [], OnOrOff).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_admin/cluster/maintenance">>, [], OnOrOff).
%%%%%%%%%%%%%%% Agency ??????????????????????????

+ 28
- 28
src/agApi/agCollections.erl 查看文件

@ -93,13 +93,13 @@
newColl(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/collection">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/collection">>, [], BodyStr).
newColl(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/collection", QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% DELETE /_api/collection/{collection-name}
@ -117,16 +117,16 @@ newColl(PoolNameOrSocket, MapData, QueryPars) ->
% 404HTTP 404
delColl(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delColl(PoolNameOrSocket, CollName, IsSystem) ->
case IsSystem of
true ->
Path = <<"/_api/collection/", CollName/binary, "?isSystem=true">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined);
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined);
_ ->
Path = <<"/_api/collection/", CollName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined)
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined)
end.
%
@ -140,7 +140,7 @@ delColl(PoolNameOrSocket, CollName, IsSystem) ->
% 404 HTTP 404
clearColl(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/truncate">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
% GET /_api/collection/{collection-name}
@ -166,7 +166,7 @@ clearColl(PoolNameOrSocket, CollName) ->
% 404HTTP 404
collInfo(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
@ -179,7 +179,7 @@ collInfo(PoolNameOrSocket, CollName) ->
% HTTP 200
collProps(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", (CollName)/binary, "/properties">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_api/collection/{collection-name}/count
@ -193,7 +193,7 @@ collProps(PoolNameOrSocket, CollName) ->
% 404 HTTP 404
collCount(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/count">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_api/collection/{collection-name}/figures
@ -211,7 +211,7 @@ collCount(PoolNameOrSocket, CollName) ->
% 404 HTTP 404
collFigures(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/figures">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% PUT /_api/collection/{collection-name}/responsibleShard
@ -232,7 +232,7 @@ collFigures(PoolNameOrSocket, CollName) ->
collResponsibleShard(PoolNameOrSocket, CollName, MapData) ->
Path = <<"/_api/collection/", CollName/binary, "/responsibleShard">>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], BodyStr).
% ID
% GET /_api/collection/{collection-name}/shards
@ -250,16 +250,16 @@ collResponsibleShard(PoolNameOrSocket, CollName, MapData) ->
% 501HTTP 501
collShards(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/shards">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
collShards(PoolNameOrSocket, CollName, IsDetails) ->
case IsDetails of
true ->
Path = <<"/_api/collection/", CollName/binary, "/shards?details=true">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined);
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined);
_ ->
Path = <<"/_api/collection/", CollName/binary, "/shards">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined)
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined)
end.
% ID
@ -274,7 +274,7 @@ collShards(PoolNameOrSocket, CollName, IsDetails) ->
% 404 HTTP 404
collRev(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/revision">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_api/collection/{collection-name}/checksum
@ -298,12 +298,12 @@ collRev(PoolNameOrSocket, CollName) ->
% 404 HTTP 404
collChecksum(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/checksum">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
collChecksum(PoolNameOrSocket, CollName, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/collection/", CollName/binary, "/checksum", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_api/collection
@ -315,15 +315,15 @@ collChecksum(PoolNameOrSocket, CollName, QueryPars) ->
%
% 200
collList(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/collection">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/collection">>, [], undefined).
collList(PoolNameOrSocket, IsExcludeSystem) ->
case IsExcludeSystem of
false ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/collection">>, [], undefined);
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/collection">>, [], undefined);
_ ->
Path = <<"/_api/collection?excludeSystem=true">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined)
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined)
end.
%
@ -348,11 +348,11 @@ collList(PoolNameOrSocket, IsExcludeSystem) ->
% 404 HTTP 404
loadColl(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/load">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
loadColl(PoolNameOrSocket, CollName, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/collection/", CollName/binary, "/load">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/collection/", CollName/binary, "/load">>, [], BodyStr).
%
% PUT /_api/collection/{collection-name}/unload
@ -371,7 +371,7 @@ loadColl(PoolNameOrSocket, CollName, MapData) ->
% 404HTTP 404
unloadColl(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/unload">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
% PUT /_api/collection/{collection-name}/loadIndexesIntoMemory
@ -387,7 +387,7 @@ unloadColl(PoolNameOrSocket, CollName) ->
% 404HTTP 404
collLoadIndexesIntoMemory(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/loadIndexesIntoMemory">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
% PUT /_api/collection/{collection-name}/properties
@ -422,7 +422,7 @@ collLoadIndexesIntoMemory(PoolNameOrSocket, CollName) ->
collChangeProps(PoolNameOrSocket, CollName, MapData) ->
Path = <<"/_api/collection/", CollName/binary, "/properties">>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
%
% PUT /_api/collection/{collection-name}/rename
@ -447,7 +447,7 @@ collChangeProps(PoolNameOrSocket, CollName, MapData) ->
renameColl(PoolNameOrSocket, OldName, NewName) ->
Path = <<"/_api/collection/", OldName/binary, "/rename">>,
NameStr = jiffy:encode(NewName),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], <<"{\"name\":", NameStr/binary, "}">>).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], <<"{\"name\":", NameStr/binary, "}">>).
%
% PUT /_api/collection/{collection-name}/rotate
@ -464,7 +464,7 @@ renameColl(PoolNameOrSocket, OldName, NewName) ->
% 3.7
collRotate(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/rotate">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
% PUT /_api/collection/{collection-name}/recalculateCount
@ -479,4 +479,4 @@ collRotate(PoolNameOrSocket, CollName) ->
% 404HTTP 404
collRecount(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/recalculateCount">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).

+ 5
- 5
src/agApi/agDbMgr.erl 查看文件

@ -34,7 +34,7 @@
% 400
% 404
curDbInfo(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/database/current">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/database/current">>, [], undefined).
% 访
% GET /_api/database/user
@ -43,7 +43,7 @@ curDbInfo(PoolNameOrSocket) ->
% 200
% 400
visitDbs(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/database/user">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/database/user">>, [], undefined).
%
% GET /_api/database
@ -55,7 +55,7 @@ visitDbs(PoolNameOrSocket) ->
% 400
% 403_system数据库中执行
allDbs(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/database">>, [], undefined, true).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/database">>, [], undefined, true).
%
% POST /_api/database
@ -80,7 +80,7 @@ allDbs(PoolNameOrSocket) ->
% 409
newDb(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/database">>, [], BodyStr, true).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/database">>, [], BodyStr, true).
%
% DELETE /_api/database/{database-name}
@ -95,4 +95,4 @@ newDb(PoolNameOrSocket, MapData) ->
% 404
delDb(PoolNameOrSocket, Name) ->
Path = <<"/_api/database/", Name/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined, true).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined, true).

+ 25
- 25
src/agApi/agDocuments.erl 查看文件

@ -102,11 +102,11 @@
% 412 If-Match412_rev属性中包含找到的文档的当前修订_id和_key
getDoc(PoolNameOrSocket, CollName, Key) ->
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
getDoc(PoolNameOrSocket, CollName, Key, Headers) ->
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, Headers, undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, Headers, undefined).
%
% HEAD /_api/document/{collection}/{key}
@ -124,11 +124,11 @@ getDoc(PoolNameOrSocket, CollName, Key, Headers) ->
% 412 If-Match412Etag标头中包含找到的文档的当前版本
getDocHead(PoolNameOrSocket, CollName, Key) ->
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgHead, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgHead, Path, [], undefined).
getDocHead(PoolNameOrSocket, CollName, Key, Headers) ->
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgHead, Path, Headers, undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgHead, Path, Headers, undefined).
%
% POST /_api/document/{collection}
@ -169,13 +169,13 @@ getDocHead(PoolNameOrSocket, CollName, Key, Headers) ->
newDoc(PoolNameOrSocket, CollName, MapData) ->
Path = <<"/_api/document/", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
newDoc(PoolNameOrSocket, CollName, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% PUT /_api/document/{collection}/{key}
@ -213,19 +213,19 @@ newDoc(PoolNameOrSocket, CollName, MapData, QueryPars) ->
replaceDoc(PoolNameOrSocket, CollName, Key, MapData) ->
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
replaceDoc(PoolNameOrSocket, CollName, Key, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
replaceDoc(PoolNameOrSocket, CollName, Key, MapData, QueryPars, Headers) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, Headers, BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, Headers, BodyStr).
%
% PATCH /_api/document/{collection}/{key}
@ -266,19 +266,19 @@ replaceDoc(PoolNameOrSocket, CollName, Key, MapData, QueryPars, Headers) ->
updateDoc(PoolNameOrSocket, CollName, Key, MapData) ->
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
updateDoc(PoolNameOrSocket, CollName, Key, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
updateDoc(PoolNameOrSocket, CollName, Key, MapData, QueryPars, Headers) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, Headers, BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, Headers, BodyStr).
%
% DELETE /_api/document/{collection}/{key}
@ -301,17 +301,17 @@ updateDoc(PoolNameOrSocket, CollName, Key, MapData, QueryPars, Headers) ->
% 412-match_rev属性中包含找到的文档的当前修订_id和_key
delDoc(PoolNameOrSocket, CollName, Key) ->
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delDoc(PoolNameOrSocket, CollName, Key, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delDoc(PoolNameOrSocket, CollName, Key, QueryPars, Headers) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, "/", (agMiscUtils:toBinary(Key))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, Headers, undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, Headers, undefined).
%
% ArangoDB支持批量处理文档 使API变体可使客户端分摊整批文档中的单个请求的开销ArangoDB
@ -338,7 +338,7 @@ getDocs(PoolNameOrSocket, CollName, KeyOrMapDataList) ->
QueryBinary = agMiscUtils:spellQueryPars([{onlyget, true}]),
Path = <<"/_api/document/", CollName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(KeyOrMapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
getDocs(PoolNameOrSocket, CollName, KeyOrMapDataList, QueryPars) ->
LastQueryPars =
@ -351,7 +351,7 @@ getDocs(PoolNameOrSocket, CollName, KeyOrMapDataList, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(LastQueryPars),
Path = <<"/_api/document/", CollName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(KeyOrMapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
%
% POST /_api/document/{collection}#multiple
@ -386,13 +386,13 @@ getDocs(PoolNameOrSocket, CollName, KeyOrMapDataList, QueryPars) ->
newDocs(PoolNameOrSocket, CollName, MapDataList) ->
Path = <<"/_api/document/", CollName/binary>>,
BodyStr = jiffy:encode(MapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
newDocs(PoolNameOrSocket, CollName, MapDataList, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% PUT /_api/document/{collection}
@ -422,13 +422,13 @@ newDocs(PoolNameOrSocket, CollName, MapDataList, QueryPars) ->
replaceDocs(PoolNameOrSocket, CollName, MapDataList) ->
Path = <<"/_api/document/", CollName/binary>>,
BodyStr = jiffy:encode(MapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
replaceDocs(PoolNameOrSocket, CollName, MapDataList, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
%
% PATCH /_api/document/{collection}
@ -461,13 +461,13 @@ replaceDocs(PoolNameOrSocket, CollName, MapDataList, QueryPars) ->
updateDocs(PoolNameOrSocket, CollName, MapDataList) ->
Path = <<"/_api/document/", CollName/binary>>,
BodyStr = jiffy:encode(MapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
updateDocs(PoolNameOrSocket, CollName, MapDataList, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
%
% DELETE /_api/document/{collection}
@ -491,10 +491,10 @@ updateDocs(PoolNameOrSocket, CollName, MapDataList, QueryPars) ->
delDocs(PoolNameOrSocket, CollName, KeyOrMapDataList) ->
Path = <<"/_api/document/", CollName/binary, "/">>,
BodyStr = jiffy:encode(KeyOrMapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], BodyStr).
delDocs(PoolNameOrSocket, CollName, KeyOrMapDataList, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/document/", CollName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(KeyOrMapDataList),
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], BodyStr).

+ 1
- 1
src/agApi/agEdges.erl 查看文件

@ -40,4 +40,4 @@
getEdges(PoolNameOrSocket, CollName, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/edges/", CollName/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).

+ 1
- 1
src/agApi/agEndPoints.erl 查看文件

@ -27,7 +27,7 @@
% tcp://[::1]:8530
% 501
getClusterEndpoints(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/cluster/endpoints">>, [], undefined, true).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/cluster/endpoints">>, [], undefined, true).
%
% API调用返回所有端点

+ 22
- 22
src/agApi/agFoxxServices.erl 查看文件

@ -31,11 +31,11 @@
%
% 200
getFoxxList(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/foxx">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/foxx">>, [], undefined).
getFoxxList(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/foxx", QueryBinary/binary>>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/foxx", QueryBinary/binary>>, [], undefined).
%
%
@ -57,7 +57,7 @@ getFoxxList(PoolNameOrSocket, QueryPars) ->
% 400
getFoxxService(PoolNameOrSocket, Mount) ->
Path = <<"/_api/foxx/service?mount=", (agMiscUtils:toBinary(Mount))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% POST /_api/foxx
@ -86,7 +86,7 @@ installFoxx(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx", QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% DELETE /_api/foxx/service
@ -100,7 +100,7 @@ installFoxx(PoolNameOrSocket, MapData, QueryPars) ->
uninstallFoxx(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/service", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
%
% PUT /_api/foxx/service
@ -131,7 +131,7 @@ replaceFoxx(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/service", QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
%
% PATCH /_api/foxx/service
@ -162,7 +162,7 @@ upgradeFoxx(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/service", QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
% Foxx服务配置/
% Foxx服务配置和依赖关系的ArangoDB HTTP接口的简介
@ -178,7 +178,7 @@ upgradeFoxx(PoolNameOrSocket, MapData, QueryPars) ->
getFoxxConfig(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/configuration", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% PATCH /_api/foxx/configuration
@ -194,7 +194,7 @@ updateFoxxConfig(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/configuration", QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
%
% PUT /_api/foxx/configuration
@ -210,7 +210,7 @@ replaceFoxxConfig(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/configuration", QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
%
% GET /_api/foxx/dependencies
@ -223,7 +223,7 @@ replaceFoxxConfig(PoolNameOrSocket, MapData, QueryPars) ->
getFoxxDependencies(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/dependencies", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
@ -240,7 +240,7 @@ updateFoxxDependencies(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/dependencies", QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
%
% PUT /_api/foxx/dependencies
@ -256,7 +256,7 @@ replaceFoxxDependencies(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/dependencies", QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
% Foxx服务杂项
%
@ -271,7 +271,7 @@ replaceFoxxDependencies(PoolNameOrSocket, MapData, QueryPars) ->
getFoxxScripts(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/scripts", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% POST /_api/foxx/scripts/{name}
@ -289,7 +289,7 @@ runFoxxScripts(PoolNameOrSocket, ScriptName, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/scripts/", ScriptName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% POST /_api/foxx/tests
@ -315,7 +315,7 @@ runFoxxScripts(PoolNameOrSocket, ScriptName, MapData, QueryPars) ->
runFoxxTest(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/tests", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).
%
% POST /_api/foxx/development
@ -329,7 +329,7 @@ runFoxxTest(PoolNameOrSocket, QueryPars) ->
enableFoxxDevelopment(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/development", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).
%
% DELETE /_api/foxx/development
@ -342,7 +342,7 @@ enableFoxxDevelopment(PoolNameOrSocket, QueryPars) ->
disableFoxxDevelopment(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/development", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
%
% GET /_api/foxx/readme
@ -355,7 +355,7 @@ disableFoxxDevelopment(PoolNameOrSocket, QueryPars) ->
getFoxxReadme(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/readme", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_api/foxx/swagger
@ -368,7 +368,7 @@ getFoxxReadme(PoolNameOrSocket, QueryPars) ->
getFoxxSwagger(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/swagger", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% POST /_api/foxx/download
@ -383,7 +383,7 @@ getFoxxSwagger(PoolNameOrSocket, QueryPars) ->
downloadFoxxBundle(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/download", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).
%
% POST /_api/foxx/commit
@ -396,4 +396,4 @@ downloadFoxxBundle(PoolNameOrSocket, QueryPars) ->
commitFoxxState(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/foxx/commit", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).

+ 44
- 44
src/agApi/agGeneralGraphs.erl 查看文件

@ -29,7 +29,7 @@
% isSmartSmartGraph
% smartGraphAttribute
graphList(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/gharial">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/gharial">>, [], undefined).
%
%
@ -78,13 +78,13 @@ graphList(PoolNameOrSocket) ->
% errorMessage
newGraph(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/gharial">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/gharial">>, [], BodyStr).
newGraph(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial", QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% GET /_api/gharial/{graph}
@ -102,7 +102,7 @@ newGraph(PoolNameOrSocket, MapData, QueryPars) ->
% errorMessage
getGraph(PoolNameOrSocket, GraphName) ->
Path = <<"/_api/gharial/", GraphName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% DELETE /_api/gharial/{graph}
@ -126,12 +126,12 @@ getGraph(PoolNameOrSocket, GraphName) ->
% errorMessage
delGraph(PoolNameOrSocket, GraphName) ->
Path = <<"/_api/gharial/", GraphName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delGraph(PoolNameOrSocket, GraphName, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
% 使
% GET /_api/gharial/{graph}/vertex
@ -149,7 +149,7 @@ delGraph(PoolNameOrSocket, GraphName, QueryPars) ->
% errorMessage
vertexCollList(PoolNameOrSocket, GraphName) ->
Path = <<"/_api/gharial/", GraphName/binary, "/vertex">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% POST /_api/gharial/{graph}/vertex
@ -186,7 +186,7 @@ vertexCollList(PoolNameOrSocket, GraphName) ->
addVertexColl(PoolNameOrSocket, GraphName, MapData) ->
Path = <<"/_api/gharial/", GraphName/binary, "/vertex">>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% DELETE /_api/gharial/{graph}/vertex/{collection}
@ -222,12 +222,12 @@ addVertexColl(PoolNameOrSocket, GraphName, MapData) ->
% errorMessage
delVertexColl(PoolNameOrSocket, GraphName, CollName) ->
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delVertexColl(PoolNameOrSocket, GraphName, CollName, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
%
% GET /_api/gharial/{graph}/edge
@ -245,7 +245,7 @@ delVertexColl(PoolNameOrSocket, GraphName, CollName, QueryPars) ->
% errorMessage
edgeDefList(PoolNameOrSocket, GraphName) ->
Path = <<"/_api/gharial/", GraphName/binary, "/edge">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% POST /_api/gharial/{graph}/edge
@ -284,7 +284,7 @@ edgeDefList(PoolNameOrSocket, GraphName) ->
addEdgeDef(PoolNameOrSocket, GraphName, MapData) ->
Path = <<"/_api/gharial/", GraphName/binary, "/edge">>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% PUT /_api/gharial/{graph}/edge/{definition}#definition
@ -328,13 +328,13 @@ addEdgeDef(PoolNameOrSocket, GraphName, MapData) ->
replaceEdgeDef(PoolNameOrSocket, GraphName, EdgeDefName, MapData) ->
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", EdgeDefName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
replaceEdgeDef(PoolNameOrSocket, GraphName, EdgeDefName, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", EdgeDefName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
%
% DELETE /_api/gharial/{graph}/edge/{definition}#definition
@ -366,12 +366,12 @@ replaceEdgeDef(PoolNameOrSocket, GraphName, EdgeDefName, MapData, QueryPars) ->
% errorMessage
delEdgeDef(PoolNameOrSocket, GraphName, EdgeDefName) ->
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", EdgeDefName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delEdgeDef(PoolNameOrSocket, GraphName, EdgeDefName, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", EdgeDefName/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
%
@ -410,13 +410,13 @@ delEdgeDef(PoolNameOrSocket, GraphName, EdgeDefName, QueryPars) ->
newVertex(PoolNameOrSocket, GraphName, CollName, MapData) ->
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
newVertex(PoolNameOrSocket, GraphName, CollName, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% GET /_api/gharial/{graph}/vertex/{collection}/{vertex}
@ -461,17 +461,17 @@ newVertex(PoolNameOrSocket, GraphName, CollName, MapData, QueryPars) ->
% errorMessage
getVertex(PoolNameOrSocket, GraphName, CollName, VertexKey) ->
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
getVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
getVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, QueryPars, Headers) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, Headers, undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, Headers, undefined).
%
% PATCH /_api/gharial/{graph}/vertex/{collection}/{vertex}
@ -524,19 +524,19 @@ getVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, QueryPars, Headers)
updateVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, MapData) ->
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
updateVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
updateVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, MapData, QueryPars, Headers) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, Headers, BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, Headers, BodyStr).
%
% PUT /_api/gharial/{graph}/vertex/{collection}/{vertex}
@ -589,19 +589,19 @@ updateVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, MapData, QueryPar
replaceVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, MapData) ->
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
replaceVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
replaceVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, MapData, QueryPars, Headers) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, Headers, BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, Headers, BodyStr).
%
% DELETE /_api/gharial/{graph}/vertex/{collection}/{vertex}
@ -647,17 +647,17 @@ replaceVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, MapData, QueryPa
% errorMessage
delVertex(PoolNameOrSocket, GraphName, CollName, VertexKey) ->
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, QueryPars, Headers) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/vertex/", CollName/binary, "/", (agMiscUtils:toBinary(VertexKey))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, Headers, undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, Headers, undefined).
%
%
@ -705,13 +705,13 @@ delVertex(PoolNameOrSocket, GraphName, CollName, VertexKey, QueryPars, Headers)
newEdge(PoolNameOrSocket, GraphName, CollName, MapData) ->
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
newEdge(PoolNameOrSocket, GraphName, CollName, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% GET /_api/gharial/{graph}/edge/{collection}/{edge}
@ -756,17 +756,17 @@ newEdge(PoolNameOrSocket, GraphName, CollName, MapData, QueryPars) ->
% errorMessage
getEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey) ->
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
getEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
getEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, QueryPars, Headers) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, Headers, undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, Headers, undefined).
%
% PATCH /_api/gharial/{graph}/edge/{collection}/{edge}
@ -820,19 +820,19 @@ getEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, QueryPars, Headers) ->
updateEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, MapData) ->
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
updateEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
updateEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, MapData, Headers, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, Headers, BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, Headers, BodyStr).
%
@ -888,19 +888,19 @@ updateEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, MapData, Headers, Que
replaceEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, MapData) ->
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
replaceEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
replaceEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, MapData, QueryPars, Headers) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary, QueryBinary/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, Headers, BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, Headers, BodyStr).
%
% DELETE /_api/gharial/{graph}/edge/{collection}/{edge}
@ -946,16 +946,16 @@ replaceEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, MapData, QueryPars,
% errorMessage
delEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey) ->
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
delEdge(PoolNameOrSocket, GraphName, CollName, EdgeKey, Headers, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/gharial/", GraphName/binary, "/edge/", CollName/binary, "/", (agMiscUtils:toBinary(EdgeKey))/binary, QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, Headers, undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, Headers, undefined).

+ 6
- 6
src/agApi/agHotBackup.erl 查看文件

@ -31,7 +31,7 @@
% 408HTTP 408
newBackup(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/create">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/create">>, [], BodyStr).
%
% POST /_admin/backup/restore
@ -43,7 +43,7 @@ newBackup(PoolNameOrSocket, MapData) ->
% 400使HTTP方法调用了restore命令POSTHTTP 400
restoreBackup(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/restore">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/restore">>, [], BodyStr).
%
% POST /_admin/backup/delete
@ -56,7 +56,7 @@ restoreBackup(PoolNameOrSocket, MapData) ->
% 404id找不到与该标识符相对应的备份
delBackup(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/delete">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/delete">>, [], BodyStr).
%
% POST /_admin/backup/list
@ -69,7 +69,7 @@ delBackup(PoolNameOrSocket, MapData) ->
% 404id给出了ID或ID列表ID作为备份的标识符HTTP 404 NOT FOUND
% 405使HTTP方法调用了list命令POSTHTTP 405 METHOD NOT ALLOWED
getBackupList(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/list">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/list">>, [], undefined).
% list热备份的一个对象组成idid唯一地标识了特定的热备份version描绘了用于创建任何单个热备份的ArangoDB的版本datetime显示了创建热备份的时间
% sizeInBytesnrFiles的数量nrDBServers的数量访db服务器上找到的nrPiecesPresent
@ -94,7 +94,7 @@ getBackupList(PoolNameOrSocket) ->
% 404id uploadId
uploadBackup(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/upload">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/upload">>, [], BodyStr).
%
% POST /_admin/backup/download
@ -113,4 +113,4 @@ uploadBackup(PoolNameOrSocket, MapData) ->
% 404id downloadId
downloadBackup(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/download">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/backup/download">>, [], BodyStr).

+ 16
- 16
src/agApi/agIndexes.erl 查看文件

@ -58,7 +58,7 @@
% 404 HTTP 404
getIndexInfo(PoolNameOrSocket, IndexId) ->
Path = <<"/_api/index/", (agMiscUtils:toBinary(IndexId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% POST /_api/index#general
@ -88,7 +88,7 @@ getIndexInfo(PoolNameOrSocket, IndexId) ->
newIndex(PoolNameOrSocket, CollName, MapData) ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr).
%
% DELETE /_api/index/{index-id}
@ -100,7 +100,7 @@ newIndex(PoolNameOrSocket, CollName, MapData) ->
% 404index-id未知HTTP 404
delIndex(PoolNameOrSocket, IndexId) ->
Path = <<"/_api/index/", (agMiscUtils:toBinary(IndexId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
%
% GET /_api/index
@ -111,7 +111,7 @@ delIndex(PoolNameOrSocket, IndexId) ->
% 200JSON对象
getIndexList(PoolNameOrSocket, CollName) ->
Path = <<"/_api/index?collection=", CollName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
% 使
% /_api/simple/by-example则将使用该索引执行示例查询
@ -140,11 +140,11 @@ newIndexOfHash(PoolNameOrSocket, CollName, MapData) ->
#{type := <<"hash">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
#{<<"type">> := <<"hash">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
_ ->
{error, param}
end.
@ -209,11 +209,11 @@ newIndexOfSkipList(PoolNameOrSocket, CollName, MapData) ->
#{type := <<"skiplist">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
#{<<"type">> := <<"skiplist">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
_ ->
{error, param}
end.
@ -244,11 +244,11 @@ newIndexOfPersistent(PoolNameOrSocket, CollName, MapData) ->
#{type := <<"persistent">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
#{<<"type">> := <<"persistent">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
_ ->
{error, param}
end.
@ -274,11 +274,11 @@ newIndexOfTtl(PoolNameOrSocket, CollName, MapData) ->
#{type := <<"ttl">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
#{<<"type">> := <<"ttl">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
_ ->
{error, param}
end.
@ -306,11 +306,11 @@ newIndexOfGeo(PoolNameOrSocket, CollName, MapData) ->
#{type := <<"geo">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
#{<<"type">> := <<"geo">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
_ ->
{error, param}
end.
@ -378,11 +378,11 @@ newIndexOfFulltext(PoolNameOrSocket, CollName, MapData) ->
#{type := <<"fulltext">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
#{<<"type">> := <<"fulltext">>} ->
Path = <<"/_api/index?collection=", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], BodyStr);
_ ->
{error, param}
end.

+ 14
- 14
src/agApi/agMiscFuns.erl 查看文件

@ -53,12 +53,12 @@
% mode-[ ]
% hostID
srvVersion(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/version">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/version">>, [], undefined).
srvVersion(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/version", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_api/engine
@ -66,7 +66,7 @@ srvVersion(PoolNameOrSocket, QueryPars) ->
% HTTP 200
% mmfiles或rocksdb
srvEngine(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/engine">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/engine">>, [], undefined).
% WAL同步到磁盘
% PUT /_admin/wal/flush
@ -78,12 +78,12 @@ srvEngine(PoolNameOrSocket) ->
% 200
% 405使HTTP方法时返回
flushWal(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_admin/wal/flush">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_admin/wal/flush">>, [], undefined).
flushWal(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_admin/wal/flush", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
% GET /_admin/wal/properties
@ -99,7 +99,7 @@ flushWal(PoolNameOrSocket, QueryPars) ->
% 200
% 405使HTTP方法时返回
getWalProps(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/wal/properties">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/wal/properties">>, [], undefined).
% Wal的参数
% PUT /_admin/wal/properties
@ -116,7 +116,7 @@ getWalProps(PoolNameOrSocket) ->
% 405使HTTP方法时返回
setWalProps(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_admin/wal/properties">>, BodyStr, undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_admin/wal/properties">>, BodyStr, undefined).
%
% GET /_admin/wal/transactions
@ -128,7 +128,7 @@ setWalProps(PoolNameOrSocket, MapData) ->
% 200
% 405使HTTP方法时返回
getTransactions(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/wal/transactions">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/wal/transactions">>, [], undefined).
%
% GET /_admin/time
@ -138,7 +138,7 @@ getTransactions(PoolNameOrSocket) ->
% codeHTTP状态码
% timeUnix时间戳记为单位
curDbTime(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/time">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/time">>, [], undefined).
%
%
@ -172,7 +172,7 @@ curDbTime(PoolNameOrSocket) ->
% rawRequestBody
echo(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/echo">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/echo">>, [], BodyStr).
%
% GET /_admin/database/target-version
@ -180,7 +180,7 @@ echo(PoolNameOrSocket, MapData) ->
%
% 200
targetVersion(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/database/target-version">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/database/target-version">>, [], undefined).
%
% DELETE /_admin/shutdown
@ -188,7 +188,7 @@ targetVersion(PoolNameOrSocket) ->
%
% 200OK都将返回
shutDown(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, <<"/_admin/shutdown">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, <<"/_admin/shutdown">>, [], undefined).
%
@ -203,7 +203,7 @@ shutDown(PoolNameOrSocket) ->
% 403ArangoDB不在集群模式下运行
% 404ArangoDB404
execute(PoolNameOrSocket, BodyStr) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/execute">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/execute">>, [], BodyStr).
%
% GET /_admin/status
@ -237,5 +237,5 @@ execute(PoolNameOrSocket, BodyStr) ->
%
% 200
dbStatus(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/status">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/status">>, [], undefined).

+ 2
- 2
src/agApi/agRepairJobs.erl 查看文件

@ -30,7 +30,7 @@
%%
%% GET /_admin/repairs/distributeShardsLike
checkRepair(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/repairs/distributeShardsLike">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/repairs/distributeShardsLike">>, [], undefined).
% collections<db>/<collection>error属性true如果该集合false error为trueerrorNum和 errorMessageerrorDetails
% POST /_admin/repairs/distributeShardsLike
@ -72,4 +72,4 @@ checkRepair(PoolNameOrSocket) ->
%%
%% POST /_admin/repairs/distributeShardsLike
doRepair(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/repairs/distributeShardsLike">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/repairs/distributeShardsLike">>, [], undefined).

+ 30
- 30
src/agApi/agReplication.erl 查看文件

@ -54,7 +54,7 @@
getRepInventory(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/replication/inventory", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
%
@ -73,7 +73,7 @@ getRepInventory(PoolNameOrSocket, QueryPars) ->
% 405使HTTP方法时返回
newRepBatch(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/replication/batch">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/replication/batch">>, [], BodyStr).
%
%
@ -89,7 +89,7 @@ newRepBatch(PoolNameOrSocket, MapData) ->
% 405使HTTP方法时返回
delRepBatch(PoolNameOrSocket, BatchId) ->
Path = <<"/_api/replication/batch/", (agMiscUtils:toBinary(BatchId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
%
%
@ -112,7 +112,7 @@ delRepBatch(PoolNameOrSocket, BatchId) ->
prolongRepBatch(PoolNameOrSocket, BatchId, MapData) ->
Path = <<"/_api/replication/batch/", (agMiscUtils:toBinary(BatchId))/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
%
%
@ -144,7 +144,7 @@ prolongRepBatch(PoolNameOrSocket, BatchId, MapData) ->
getRepDump(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/replication/dump", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
% Merkle树以进行收集
% Merkle树
@ -182,7 +182,7 @@ getRepDump(PoolNameOrSocket, QueryPars) ->
getRepTree(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/replication/revisions/tree", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
% Merkle树
% Merkle树
@ -202,7 +202,7 @@ getRepTree(PoolNameOrSocket, QueryPars) ->
resetRepTree(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/replication/revisions/tree", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, Path, [], undefined).
% ID
% ID
@ -215,7 +215,7 @@ resetRepTree(PoolNameOrSocket, QueryPars) ->
getRepRanges(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/replication/revisions/ranges", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
%
@ -246,7 +246,7 @@ getRepRanges(PoolNameOrSocket, QueryPars) ->
getRepDoc(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/replication/revisions/documents", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
%
@ -278,7 +278,7 @@ getRepDoc(PoolNameOrSocket, QueryPars) ->
% 501
startRepSync(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/sync">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/sync">>, [], BodyStr).
%
%
@ -294,7 +294,7 @@ startRepSync(PoolNameOrSocket, MapData) ->
getRepClusterInv(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/replication/clusterInventory", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% ArangoDB允许启动ArangoDB 2.2
@ -323,7 +323,7 @@ getRepClusterInv(PoolNameOrSocket, QueryPars) ->
% 405使HTTP方法时返回
% 500
getRepLoggerState(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/logger-state">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/logger-state">>, [], undefined).
%
@ -378,7 +378,7 @@ getRepLoggerState(PoolNameOrSocket) ->
% 500500
% 501
getRepLoggerFirstTick(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/logger-first-tick">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/logger-first-tick">>, [], undefined).
%
% GET /_api/replication/logger-tick-ranges
@ -394,7 +394,7 @@ getRepLoggerFirstTick(PoolNameOrSocket) ->
% 500
% 501
getRepLoggerTickRanges(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/logger-tick-ranges">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/logger-tick-ranges">>, [], undefined).
%
% applier命令允许远程启动ArangoDB数据库复制应用程序的状态和配置
@ -433,11 +433,11 @@ getRepLoggerTickRanges(PoolNameOrSocket) ->
% 405使HTTP方法时返回
% 500500
getRepApplierConfig(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/applier-config">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/applier-config">>, [], undefined).
getRepApplierConfig(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/applier-config", QueryBinary/binary>>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/applier-config", QueryBinary/binary>>, [], undefined).
%
% PUT /_api/replication/applier-config
@ -475,12 +475,12 @@ getRepApplierConfig(PoolNameOrSocket, QueryPars) ->
% 500500
setRepApplierConfig(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-config">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-config">>, [], BodyStr).
setRepApplierConfig(PoolNameOrSocket, MapData, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-config", QueryBinary/binary>>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-config", QueryBinary/binary>>, [], BodyStr).
%
% PUT /_api/replication/applier-start
@ -496,12 +496,12 @@ setRepApplierConfig(PoolNameOrSocket, MapData, QueryPars) ->
% 405使HTTP方法时返回
% 500500
startRepApplier(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-start">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-start">>, [], undefined).
startRepApplier(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/replication/applier-start", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
% PUT /_api/replication/applier-stop
@ -513,11 +513,11 @@ startRepApplier(PoolNameOrSocket, QueryPars) ->
% 405使HTTP方法时返回
% 500500
stopRepApplier(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-stop">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-stop">>, [], undefined).
stopRepApplier(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-stop", QueryBinary/binary>>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/applier-stop", QueryBinary/binary>>, [], undefined).
%
% GET /_api/replication/applier-state
@ -559,11 +559,11 @@ stopRepApplier(PoolNameOrSocket, QueryPars) ->
% 405使HTTP方法时返回
% 500500
getRepApplierState(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/applier-state">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/applier-state">>, [], undefined).
getRepApplierState(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/applier-state", QueryBinary/binary>>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/applier-state", QueryBinary/binary>>, [], undefined).
%
% PUT /_api/replication/make-slave
@ -632,7 +632,7 @@ getRepApplierState(PoolNameOrSocket, QueryPars) ->
% 501
changeRepMakeSlave(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/make-slave">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, <<"/_api/replication/make-slave">>, [], BodyStr).
%
%ID
@ -645,7 +645,7 @@ changeRepMakeSlave(PoolNameOrSocket, MapData) ->
%405使HTTP方法时返回
%500500
getRepServerId(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/server-id">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/replication/server-id">>, [], undefined).
% WAL
% 线
@ -662,7 +662,7 @@ getRepServerId(PoolNameOrSocket) ->
% 500
% 501
getWalRange(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/wal/range">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/wal/range">>, [], undefined).
%
%
@ -679,7 +679,7 @@ getWalRange(PoolNameOrSocket) ->
% 500500
% 501
getWalLastTick(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/wal/lastTick">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/wal/lastTick">>, [], undefined).
%
% GET /_api/wal/tail
@ -725,10 +725,10 @@ getWalLastTick(PoolNameOrSocket) ->
% 500500
% 501
getWalTail(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/wal/tail">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/wal/tail">>, [], undefined).
getWalTail(PoolNameOrSocket, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/wal/tail", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).

+ 5
- 5
src/agApi/agTasks.erl 查看文件

@ -17,7 +17,7 @@
% HTTP 200
% **
getTaskList(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/tasks/">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/tasks/">>, [], undefined).
%
% GET /_api/tasks/{id}
@ -28,7 +28,7 @@ getTaskList(PoolNameOrSocket) ->
% **
getTask(PoolNameOrSocket, TaskId) ->
Path = <<"/_api/tasks/", (agMiscUtils:toBinary(TaskId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% POST /_api/tasks
@ -55,7 +55,7 @@ getTask(PoolNameOrSocket, TaskId) ->
% 400HTTP 400
newTask(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/tasks">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/tasks">>, [], BodyStr).
% ID的新任务
% PUT /_api/tasks/{id}
@ -73,7 +73,7 @@ newTask(PoolNameOrSocket, MapData) ->
newTask(PoolNameOrSocket, TaskId, MapData) ->
Path = <<"/_api/tasks/", (agMiscUtils:toBinary(TaskId))/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
%
% DELETE /_api/tasks/{id}
@ -89,4 +89,4 @@ newTask(PoolNameOrSocket, TaskId, MapData) ->
% errorMessage
delTask(PoolNameOrSocket, TaskId) ->
Path = <<"/_api/tasks/", (agMiscUtils:toBinary(TaskId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).

+ 6
- 6
src/agApi/agTransactions.erl 查看文件

@ -80,7 +80,7 @@
% 404使HTTP 404
beginTransaction(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/transaction/begin">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/transaction/begin">>, [], BodyStr).
%
% GET /_api/transaction/{transaction-id}
@ -95,7 +95,7 @@ beginTransaction(PoolNameOrSocket, MapData) ->
% 404使HTTP 404
getTransactionStatus(PoolNameOrSocket, TransactionId) ->
Path = <<"/_api/transaction/", (agMiscUtils:toBinary(TransactionId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
% 使使
%
@ -123,7 +123,7 @@ getTransactionStatus(PoolNameOrSocket, TransactionId) ->
% 409使HTTP 409
commitTransaction(PoolNameOrSocket, TransactionId) ->
Path = <<"/_api/transaction/", (agMiscUtils:toBinary(TransactionId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], undefined).
%
% DELETE /_api/transaction/{transaction-id}
@ -149,7 +149,7 @@ commitTransaction(PoolNameOrSocket, TransactionId) ->
% 409HTTP 409
abortTransaction(PoolNameOrSocket, TransactionId) ->
Path = <<"/_api/transaction/", (agMiscUtils:toBinary(TransactionId))/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
%
% GET /_api/transaction
@ -160,7 +160,7 @@ abortTransaction(PoolNameOrSocket, TransactionId) ->
%
% 200HTTP 200
getTransactionList(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/transaction">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/transaction">>, [], undefined).
% JavaScript交易的HTTP接口
% ArangoDB的JS事务在服务器上执行
@ -198,7 +198,7 @@ getTransactionList(PoolNameOrSocket) ->
% 500使HTTP 500
executeTransaction(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/transaction">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/transaction">>, [], BodyStr).

+ 14
- 14
src/agApi/agUserMgr.erl 查看文件

@ -29,7 +29,7 @@
% 409
newUser(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/user">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/user">>, [], BodyStr).
% 访
% PUT /_api/user/{user}/database/{dbname}
@ -49,7 +49,7 @@ newUser(PoolNameOrSocket, MapData) ->
setUserDbAccessLevel(PoolNameOrSocket, UserName, DbName, MapData) ->
Path = <<"/_api/user/", UserName/binary, "/database/", DbName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
% 访
% PUT /_api/user/{user}/database/{dbname}/{collection}
@ -71,7 +71,7 @@ setUserDbAccessLevel(PoolNameOrSocket, UserName, DbName, MapData) ->
setUserCollAccessLevel(PoolNameOrSocket, UserName, DbName, CollName, MapData) ->
Path = <<"/_api/user/", UserName/binary, "/database/", DbName/binary, "/", CollName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
% 访访
% DELETE /_api/user/{user}/database/{dbname}
@ -86,7 +86,7 @@ setUserCollAccessLevel(PoolNameOrSocket, UserName, DbName, CollName, MapData) ->
% 400JSON格式不正确或请求中缺少必需数据
clearUserDbAccessLevel(PoolNameOrSocket, UserName, DbName) ->
Path = <<"/_api/user/", UserName/binary, "/database/", DbName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
% 访访
% DELETE /_api/user/{user}/database/{dbname}/{collection}
@ -101,7 +101,7 @@ clearUserDbAccessLevel(PoolNameOrSocket, UserName, DbName) ->
% 400
clearUserCollAccessLevel(PoolNameOrSocket, UserName, DbName, CollName) ->
Path = <<"/_api/user/", UserName/binary, "/database/", DbName/binary, "/", CollName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
% 访
% GET /_api/user/{user}/database/
@ -119,12 +119,12 @@ clearUserCollAccessLevel(PoolNameOrSocket, UserName, DbName, CollName) ->
% 403访访
getUserDbList(PoolNameOrSocket, UserName) ->
Path = <<"/_api/user/", UserName/binary, "/database/">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
getUserDbList(PoolNameOrSocket, UserName, QueryPars) ->
QueryBinary = agMiscUtils:spellQueryPars(QueryPars),
Path = <<"/_api/user/", UserName/binary, "/database/", QueryBinary/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
% 访
% GET /_api/user/{user}/database/{dbname}
@ -139,7 +139,7 @@ getUserDbList(PoolNameOrSocket, UserName, QueryPars) ->
% 403访访
getUserDbAccessLevel(PoolNameOrSocket, UserName, DbName) ->
Path = <<"/_api/user/", UserName/binary, "/database/", DbName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
% 访
% GET /_api/user/{user}/database/{dbname}/{collection}
@ -155,7 +155,7 @@ getUserDbAccessLevel(PoolNameOrSocket, UserName, DbName) ->
% 403访访
getUserCollAccessLevel(PoolNameOrSocket, UserName, DbName, CollName) ->
Path = <<"/_api/user/", UserName/binary, "/database/", DbName/binary, "/", CollName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% PUT /_api/user/{user}
@ -175,7 +175,7 @@ getUserCollAccessLevel(PoolNameOrSocket, UserName, DbName, CollName) ->
replaceUser(PoolNameOrSocket, UserName, MapData) ->
Path = <<"/_api/user/", UserName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
%
% PATCH /_api/user/{user}
@ -195,7 +195,7 @@ replaceUser(PoolNameOrSocket, UserName, MapData) ->
updateUser(PoolNameOrSocket, UserName, MapData) ->
Path = <<"/_api/user/", UserName/binary>>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
%
% DELETE /_api/user/{user}
@ -209,7 +209,7 @@ updateUser(PoolNameOrSocket, UserName, MapData) ->
% 404
delUser(PoolNameOrSocket, UserName) ->
Path = <<"/_api/user/", UserName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
%
% GET /_api/user/{user}
@ -223,7 +223,7 @@ delUser(PoolNameOrSocket, UserName) ->
% 404
getUser(PoolNameOrSocket, UserName) ->
Path = <<"/_api/user/", UserName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_api/user/
@ -237,4 +237,4 @@ getUser(PoolNameOrSocket, UserName) ->
% 401_system 访访
% 403访访
getUserList(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/user/">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/user/">>, [], undefined).

+ 8
- 8
src/agApi/agViews.erl 查看文件

@ -65,7 +65,7 @@
% 409name的视图HTTP 409
newView(PoolNameOrSocket, MapData) ->
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/view">>, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_api/view">>, [], BodyStr).
%
% GET /_api/view/{view-name}
@ -79,7 +79,7 @@ newView(PoolNameOrSocket, MapData) ->
% 404HTTP 404
getViewInfo(PoolNameOrSocket, ViewName) ->
Path = <<"/_api/view/", ViewName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
%
% GET /_api/view
@ -90,7 +90,7 @@ getViewInfo(PoolNameOrSocket, ViewName) ->
%
% 200
getViewList(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/view">>, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/view">>, [], undefined).
%
% GET /_api/view/{view-name}/properties
@ -103,7 +103,7 @@ getViewList(PoolNameOrSocket) ->
% 404HTTP 404
getViewProps(PoolNameOrSocket, ViewName) ->
Path = <<"/_api/view/", ViewName/binary, "/properties">>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, Path, [], undefined).
% ArangoSearch视图的所有属性
% PUT /_api/view/{view-name}/properties#ArangoSearch
@ -141,7 +141,7 @@ getViewProps(PoolNameOrSocket, ViewName) ->
changeViewAllProps(PoolNameOrSocket, ViewName, MapData) ->
Path = <<"/_api/view/", ViewName/binary, "/properties">>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], BodyStr).
% ArangoSearch视图的属性
% PATCH /_api/view/{view-name}/properties#ArangoSearch
@ -179,7 +179,7 @@ changeViewAllProps(PoolNameOrSocket, ViewName, MapData) ->
changeViewPartProps(PoolNameOrSocket, ViewName, MapData) ->
Path = <<"/_api/view/", ViewName/binary, "/properties">>,
BodyStr = jiffy:encode(MapData),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
agVstCli:callAgency(PoolNameOrSocket, ?AgPatch, Path, [], BodyStr).
%
% PUT /_api/view/{view-name}/rename
@ -198,7 +198,7 @@ changeViewPartProps(PoolNameOrSocket, ViewName, MapData) ->
renameView(PoolNameOrSocket, ViewName, NewViewName) ->
Path = <<"/_api/view/", ViewName/binary, "/rename">>,
NameStr = jiffy:encode(NewViewName),
agHttpCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], <<"{\"name\":", NameStr/binary, "}">>).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, [], <<"{\"name\":", NameStr/binary, "}">>).
%
% DELETE /_api/view/{view-name}
@ -213,4 +213,4 @@ renameView(PoolNameOrSocket, ViewName, NewViewName) ->
% 404HTTP 404
delView(PoolNameOrSocket, ViewName) ->
Path = <<"/_api/view/", ViewName/binary>>,
agHttpCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).
agVstCli:callAgency(PoolNameOrSocket, ?AgDelete, Path, [], undefined).

src/agHttpCli/agAgencyPoolMgrExm.erl → src/agVstCli/agAgencyPoolMgrExm.erl 查看文件


src/agHttpCli/agAgencyPoolMgrIns.erl → src/agVstCli/agAgencyPoolMgrIns.erl 查看文件


src/agHttpCli/agAgencyPool_sup.erl → src/agVstCli/agAgencyPool_sup.erl 查看文件


src/agHttpCli/agAgencyUtils.erl → src/agVstCli/agAgencyUtils.erl 查看文件


src/agHttpCli/agHttpProtocol.erl → src/agVstCli/agHttpProtocol.erl 查看文件


src/agHttpCli/agKvsToBeam.erl → src/agVstCli/agKvsToBeam.erl 查看文件


src/agHttpCli/agMiscUtils.erl → src/agVstCli/agMiscUtils.erl 查看文件


src/agHttpCli/agSslAgencyExm.erl → src/agVstCli/agSslAgencyExm.erl 查看文件


src/agHttpCli/agSslAgencyIns.erl → src/agVstCli/agSslAgencyIns.erl 查看文件


src/agHttpCli/agTcpAgencyExm.erl → src/agVstCli/agTcpAgencyExm.erl 查看文件


src/agHttpCli/agTcpAgencyIns.erl → src/agVstCli/agTcpAgencyIns.erl 查看文件


src/agHttpCli/agVstAgencyExm.erl → src/agVstCli/agVstAgencyExm.erl 查看文件


src/agHttpCli/agVstAgencyIns.erl → src/agVstCli/agVstAgencyIns.erl 查看文件


src/agHttpCli/agHttpCli.erl → src/agVstCli/agVstCli.erl 查看文件

@ -1,4 +1,4 @@
-module(agHttpCli).
-module(agVstCli).
-include("agHttpCli.hrl").
-include("eArango.hrl").

src/agHttpCli/vst.erl → src/agVstCli/vst.erl 查看文件


+ 2
- 2
src/user_default.erl 查看文件

@ -6,11 +6,11 @@
start() ->
erlSync:run(),
application:ensure_all_started(erlArango),
agHttpCli:startPool(tt, [{poolSize, 10}], []).
agVstCli:startPool(tt, [{poolSize, 10}], []).
tt(C, N) ->
application:ensure_all_started(erlArango),
agHttpCli:startPool(tt, [{poolSize, 16}], []),
agVstCli:startPool(tt, [{poolSize, 16}], []),
StartTime = erlang:system_time(millisecond),
io:format("IMY********************** started~n"),
[spawn(?MODULE, test, [N, StartTime]) || _Idx <- lists:seq(1, C)].

Loading…
取消
儲存