arangodb erlang数据库驱动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 regels
2.1 KiB

4 jaren geleden
3 jaren geleden
4 jaren geleden
3 jaren geleden
4 jaren geleden
3 jaren geleden
4 jaren geleden
3 jaren geleden
4 jaren geleden
3 jaren geleden
4 jaren geleden
3 jaren geleden
4 jaren geleden
4 jaren geleden
4 jaren geleden
4 jaren geleden
3 jaren geleden
4 jaren geleden
  1. # eArango
  2. arangodb erlang driver
  3. erlang otp21.2+ arangodb 3.6.2 3.7 3.9
  4. # Feature
  5. Efficient, fast and easy to use.
  6. 1. This driver can use connection pooling or simply establish multiple connections in a single process (non-connection
  7. pooling mode) for various data operations. Synchronous and asynchronous operations are supported when using
  8. connection pooling, and you need to save the requestId extra if you want to use asynchronous operations Waiting for
  9. the received data to return, the API encapsulated by the current driver all USES synchronous operation, and can be
  10. modified if asynchronous operation is needed. Only synchronous operations are supported for single-process
  11. operations. In single-process mode, compared with connection pooling mode, data replication between processes can be
  12. reduced once. For operation of large amount of data, database connection can be established separately in data
  13. management process instead of connection pooling.
  14. 2. The connection pooling mode and connectionless pool mode API interface ensures the identity, does not need to be
  15. treated differently, and is easy to understand and change between connection pooling mode and connectionless pool
  16. mode.
  17. # Batch requests are not supported
  18. https://www.arangodb.com/docs/stable/http/batch-request.html
  19. # compile
  20. rebar3 compile
  21. # how to use
  22. revar3: rebar3 shell
  23. Non-connection pooling mode
  24. Make a connection first
  25. {ok, Socket} = agVstCli:connect([]). %% Use default Settings
  26. %% Then you can then call various apis using Socket as the first argument
  27. agMgrDb:curDbInfo(Socket).
  28. Connection pooling mode
  29. application:ensure_all_started(eArango). %% start app
  30. agVstCli:startPool(poolName, [], []). %% start pool
  31. %% Then you can then invoke various apis using poolName as the first argument
  32. agMgrDb:curDbInfo(poolName).
  33. # notice
  34. 该驱动中所有的字符串 一律值 二进制的字符串
  35. QueryPars 和 Headers为map 其中的 key -> value 必须为字符串