backend.hrl 824 B

12345678910111213141516
  1. -ifndef(BACKEND_HRL).
  2. -define(BACKEND_HRL, true).
  3. -define(BACKEND, [db/0,get/3,put/1,put/2,delete/3,delete_range/3,index/3,dump/0,start/0,stop/0,destroy/0,destroy/1,keys/2,
  4. join/2,leave/0,leave/1,dir/0,create_table/2,add_table_index/2,seq/2,all/2,count/1,version/0,match/1,index_match/2]).
  5. -compile({no_auto_import,[get/1,put/2]}).
  6. -include("kvs.hrl").
  7. -spec put(tuple() | list(tuple())) -> ok | {error,any()}.
  8. -spec put(tuple() | list(tuple()), #kvs{}) -> ok | {error,any()}.
  9. -spec get(term() | any(), any(), #kvs{}) -> {ok,any()} | {error,not_found}.
  10. -spec delete(term(), any(), #kvs{}) -> ok | {error,not_found}.
  11. -spec delete_range(term(), any(), #kvs{}) -> ok | {error,not_found}.
  12. -spec dump() -> ok.
  13. -spec start() -> ok.
  14. -spec stop() -> ok.
  15. -spec index(term(), any(), any()) -> list(tuple()).
  16. -endif.