Browse Source

ft: 代码优化调整

master
SisMaker 2 years ago
parent
commit
be67f34b72
2 changed files with 27 additions and 6 deletions
  1. +26
    -5
      src/agApi/agColls.erl
  2. +1
    -1
      src/agApi/agDocs.erl

src/agApi/agCollections.erl → src/agApi/agColls.erl View File

@ -1,4 +1,4 @@
-module(agCollections).
-module(agColls).
-include("eArango.hrl").
-compile(inline).
@ -196,7 +196,7 @@ collCnt(PoolNameOrSocket, CollName) ->
%
% 200HTTP 200
% 404HTTP 404
collRecnt(PoolNameOrSocket, CollName) ->
collReCnt(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/recalculateCount">>,
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path).
@ -320,10 +320,10 @@ collChecksum(PoolNameOrSocket, CollName, QueryPars) ->
% excludeSystem提供值为true的值
%
% 200
collList(PoolNameOrSocket) ->
colls(PoolNameOrSocket) ->
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/collection">>).
collList(PoolNameOrSocket, QueryPars) ->
colls(PoolNameOrSocket, QueryPars) ->
agVstCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_api/collection">>, QueryPars).
%
@ -439,4 +439,25 @@ collLoadIndexesIntoMemory(PoolNameOrSocket, CollName) ->
% 404 HTTP 404
collChangeProps(PoolNameOrSocket, CollName, MapData) ->
Path = <<"/_api/collection/", CollName/binary, "/properties">>,
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, ?AgDefQuery, ?AgDefHeader, eVPack:encodeBin(MapData)).
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path, ?AgDefQuery, ?AgDefHeader, eVPack:encodeBin(MapData)).
%
%
%
% PUT /_api/collection/{collection-name}/compact
%
%
%
%
% .sst
%
% /使
%
%
%
% HTTP 200
%
% HTTP 401
collCompact(PoolNameOrSocket, CollName) ->
Path = <<"/_api/collection/", CollName/binary, "/compact">>,
agVstCli:callAgency(PoolNameOrSocket, ?AgPut, Path).

src/agApi/agDocuments.erl → src/agApi/agDocs.erl View File

@ -1,4 +1,4 @@
-module(agDocuments).
-module(agDocs).
-include("eArango.hrl").
-compile(inline).

Loading…
Cancel
Save