ExDets v0.1.5 ExDets View Source

This module is a wrapper of erlang dets makes with ExWrapper. Go to the doc of :dets erlang.

Only add from :dets, for the moment:

  • ExDets add dets_files?/1.

Link to this section Summary

Functions

:dets.al/0 wrapper function

:dets.bchunk/2 wrapper function

:dets.close/1 wrapper function

:dets.is_compatible_bchunk_format/2 wrapper function

:dets.delete/2 wrapper function

:dets.delete_all_objects/1 wrapper function

:dets.delete_object/2 wrapper function

:dets.is_dets_file/1 wrapper function

It’s an ajout from my conception, it’s execute dets_file?/1 one each file in the same time with Task and check if any results is true

:dets.first/1 wrapper function

:dets.foldl/3 wrapper function

:dets.foldr/3 wrapper function

:dets.from_ets/2 wrapper function

:dets.info/1 wrapper function

:dets.info/2 wrapper function

:dets.init_table/2 wrapper function

:dets.init_table/3 wrapper function

:dets.insert/2 wrapper function

:dets.insert_new/2 wrapper function

:dets.lookup/2 wrapper function

:dets.match/1 wrapper function

:dets.match/2 wrapper function

:dets.match/3 wrapper function

:dets.match_delete/2 wrapper function

:dets.match_object/1 wrapper function

:dets.match_object/2 wrapper function

:dets.match_object/3 wrapper function

:dets.member/2 wrapper function

:dets.next/2 wrapper function

:dets.open_file/1 wrapper function

:dets.open_file/2 wrapper function

:dets.pid2name/1 wrapper fonction

:dets.repair_continuation/2 wrapper function

:dets.safe_fixtable/2 wrapper function

:dets.select/1 wrapper function

:dets.select/2 wrapper function

:dets.select/3 wrapper function

:dets.select_delete/2 wrapper function

:dets.slot/2 wrapper function

:dets.sync/1 wrapper function

:dets.table/1 wrapper function

:dets.table/2 wrapper function

:dets.to_ets/2 wrapper function

:dets.traverse/2 wrapper function

:dets.update_counter/3 wrapper function

Link to this section Functions

Link to this function all() View Source
all() :: [:dets.tab_name]

:dets.al/0 wrapper function.

Link to this function bchunk(name, continuation) View Source
bchunk(name :: :dets.tab_name, continuation :: :start | :dets.cont) ::
  {:dets.cont, binary | tuple} |
  nil |
  {:error, term}

:dets.bchunk/2 wrapper function.

Link to this function close(name) View Source
close(name :: :dets.tab_name) :: :ok | {:error, term}

:dets.close/1 wrapper function.

Link to this function compatible_bchunk_format?(name, bchunk_format) View Source
compatible_bchunk_format?(name :: :dets.tab_name, bchunk_format :: :dets.bchunk_format) :: boolean

:dets.is_compatible_bchunk_format/2 wrapper function.

Link to this function delete(name, key) View Source
delete(name :: :dets.tab_name, key :: term) ::
  :ok |
  {:error, term}

:dets.delete/2 wrapper function.

Link to this function delete_all_objects(name) View Source
delete_all_objects(name :: :dets.tab_name) :: :ok | {:error, term}

:dets.delete_all_objects/1 wrapper function.

Link to this function delete_object(name, object) View Source
delete_object(name :: :dets.tab_name, object :: :dets.object) ::
  :ok |
  {:error, term}

:dets.delete_object/2 wrapper function.

Link to this function dets_file?(filename) View Source
dets_file?(filename :: :file.name) :: boolean

:dets.is_dets_file/1 wrapper function.

Link to this function dets_files?(filenames) View Source
dets_files?(filenames :: [:file.name]) :: boolean

It’s an ajout from my conception, it’s execute dets_file?/1 one each file in the same time with Task and check if any results is true.

Parameters

  • filenames: List of :dets.filename

Examples

  ExDets.open_file("my.dets", [])
  ExDets.open_file("other.dets", [])
  File.touch("otherfile")
  refute ExDets.dets_files?(["my.dets", "other.dets", "otherfile"])
Link to this function first(name) View Source
first(name :: :dets.tab_name) :: term | nil

:dets.first/1 wrapper function.

Link to this function foldl(function, acc0, name) View Source
foldl(function :: (object :: :dets.object, acc_in :: term -> acc_out :: term), acc0 :: term, name :: :dets.tab_name) ::
  term |
  nil
foldl(function :: (object :: :dets.object, acc_in :: term -> acc_out :: term), acc0 :: term, name :: :dets.tab_name) ::
  term |
  nil

:dets.foldl/3 wrapper function.

Link to this function foldr(function, acc0, name) View Source

:dets.foldr/3 wrapper function.

Link to this function from_ets(name, ets_tab) View Source
from_ets(name :: :dets.tab_name, ets_tab :: :ets.tab) ::
  :ok |
  {:error, term}

:dets.from_ets/2 wrapper function.

Link to this function info(name) View Source
info(name :: :dets.tab_name) :: :dets.infolist | :undefined

:dets.info/1 wrapper function.

Link to this function info(name, item) View Source
info(name :: :dets.tab_name, item :: :dets.item) ::
  :dets.value |
  :undefined

:dets.info/2 wrapper function.

Link to this function init_table(name, init_fun) View Source
init_table(name :: :dets.tab_name, init_fun :: :dets.init_fun) ::
  :ok |
  {:error, term}

:dets.init_table/2 wrapper function.

Link to this function init_table(name, init_fun, options) View Source
init_table(name :: :dets.tab_name, init_fun :: :dets.init_fun, options :: :dets.options) ::
  :ok |
  {:error, term}

:dets.init_table/3 wrapper function.

Link to this function insert(name, objects) View Source
insert(name :: :dets.tab_name, objects :: :dets.objects) ::
  :ok |
  {:error, term}

:dets.insert/2 wrapper function.

Link to this function insert_new(name, objects) View Source
insert_new(name :: :dets.tab_name, objects :: :dets.objects) ::
  boolean |
  {:error, term}

:dets.insert_new/2 wrapper function.

Link to this function lookup(name, key) View Source
lookup(name :: :dets.tab_name, key :: term) ::
  :dets.objects |
  {:error, term}

:dets.lookup/2 wrapper function.

Link to this function match(continuation) View Source
match(continuation :: :dets.cont) ::
  {[term], :dets.cont} |
  nil |
  {:error, term}

:dets.match/1 wrapper function.

Link to this function match(name, pattern) View Source
match(name :: :dets.tab_name, pattern :: :dets.pattern) ::
  [term] |
  {:error, term}

:dets.match/2 wrapper function.

Link to this function match(name, pattern, n) View Source
match(name :: :dets.tab_name, pattern :: :dets.pattern, n :: :default | integer) ::
  [term] |
  {:error, term}

:dets.match/3 wrapper function.

Link to this function match_delete(name, pattern) View Source
match_delete(name :: :dets.tab_name, pattern :: :dets.pattern) ::
  :ok |
  {:error, term}

:dets.match_delete/2 wrapper function.

Link to this function match_object(continuation) View Source
match_object(continuation :: :dets.object_cont) ::
  {:dets.objects, :dets.object_cont} |
  nil |
  {:error, term}

:dets.match_object/1 wrapper function.

Link to this function match_object(name, pattern) View Source
match_object(name :: :dets.tab_name, pattern :: :dets.pattern) ::
  :dets.objects |
  {:error, term}

:dets.match_object/2 wrapper function.

Link to this function match_object(name, pattern, n) View Source
match_object(name :: :dets.tab_name, pattern :: :dets.pattern, n :: :default | integer) ::
  {:dets.objects, :dets.cont} |
  nil |
  {:error, term}

:dets.match_object/3 wrapper function.

Link to this function member(name, key) View Source
member(name :: :dets.tab_name, key :: term) ::
  boolean |
  {:error, term}

:dets.member/2 wrapper function.

Link to this function next(name, key) View Source
next(name :: :dets.tab_name, key :: term) :: term | nil

:dets.next/2 wrapper function.

Link to this function open_file(filename) View Source
open_file(filename :: :file.name) ::
  {:ok, :dets.reference} |
  {:error, term}

:dets.open_file/1 wrapper function.

Link to this function open_file(name, args) View Source
open_file(name :: :dets.tab_name, args :: :dets.args) ::
  {:ok, :dets.tab_name} |
  {:error, term}

:dets.open_file/2 wrapper function.

Link to this function pid2name(pid) View Source
pid2name(pid :: pid) :: {:ok, :dets.tab_name} | :undefined

:dets.pid2name/1 wrapper fonction.

Link to this function repair_continuation(continuation, match_spec) View Source
repair_continuation(continuation :: :dets.select_cont, match_spec :: :dets.match_spec) :: :dets.select_cont

:dets.repair_continuation/2 wrapper function.

Link to this function safe_fixtable(name, fix) View Source
safe_fixtable(name :: :dets.tab_name, fix :: boolean) :: :ok

:dets.safe_fixtable/2 wrapper function.

Link to this function select(continuation) View Source
select(continuation :: :dets.select_cont) ::
  {[term], :dets.select_cont} |
  nil |
  {:error, term}

:dets.select/1 wrapper function.

Link to this function select(name, match_spec) View Source
select(name :: :dets.tab_name, match_spec :: :dets.match_spec) ::
  [term] |
  {:error, term}

:dets.select/2 wrapper function.

Link to this function select(name, match_spec, n) View Source
select(name :: :dets.tab_name, match_spec :: :dets.match_spec, n :: :default | integer) ::
  [term] |
  nil |
  {:error, term}

:dets.select/3 wrapper function.

Link to this function select_delete(name, match_spec) View Source
select_delete(name :: term, match_spec :: :dets.match_spec) ::
  integer |
  {:error, term}

:dets.select_delete/2 wrapper function.

Link to this function slot(name, i) View Source
slot(name :: :dets.tab_name, i :: non_neg_integer) ::
  [:dets.object] |
  nil |
  {:error, term}

:dets.slot/2 wrapper function.

Link to this function sync(name) View Source
sync(name :: :dets.tab_name) :: :ok | {:error, term}

:dets.sync/1 wrapper function.

Link to this function table(name) View Source
table(name :: :dets.tab_name) :: :dets.query_handler

:dets.table/1 wrapper function.

Link to this function table(name, options) View Source
table(name :: :dets.tab_name, options :: [:dets.option] | :dets.option) :: :qlc.query_handler

:dets.table/2 wrapper function.

Link to this function to_ets(name, ets_tab) View Source
to_ets(name :: :dets.tab_name, :ets.tab) ::
  :ets.tab |
  {:error, term}

:dets.to_ets/2 wrapper function.

Link to this function traverse(name, fun) View Source
traverse(name :: :dets.tab_name, fun :: (:dets.object -> :continue | {:continue, term} | {:done, term})) ::
  [term] | term |
  {:error, term}

:dets.traverse/2 wrapper function.

Link to this function update_counter(name, key, increment) View Source
update_counter(name :: :dets.tab_name, key :: term, increment :: {integer, integer} | integer) :: integer

:dets.update_counter/3 wrapper function.