dexts v0.3.1 Dexts

Summary

Functions

Get the number of terms in the given table

Count the number of terms matching the match_spec

Delete the term matching the given pattern or key in the given table, see ets:select_delete and ets:delete

Delete the given term from the given table, see ets:delete_object

Get the first key in the given table, see dets:first

Fold the given table from the left, see dets:foldl

Fold the given table from the right, see dets:foldr

Get the keys in the given table

Match terms from the given table with the given pattern, see dets:match

Match terms from the given table with the given pattern and options, see dets:match

Get the next key in the given table, see dets:next

Synchronize the table to disk, see dets:sync

Select terms in the given table using a match_spec, see dets:select

Write the given term to the given table optionally disabling overwriting, see dets:insert and dets:insert_new

Types

table :: term

Functions

at(table, slot)
clear(table)
close(table)
count(table)

Specs

count(table) :: non_neg_integer

Get the number of terms in the given table.

count(table, match_spec)

Specs

count(table, any) :: non_neg_integer

Count the number of terms matching the match_spec.

delete(table, match_spec)

Specs

delete(table, any) :: true | integer

Delete the term matching the given pattern or key in the given table, see ets:select_delete and ets:delete.

delete!(table, object)

Specs

delete!(table, term) :: true

Delete the given term from the given table, see ets:delete_object.

first(table)

Specs

first(table) :: any | nil

Get the first key in the given table, see dets:first.

foldl(table, acc, fun)

Specs

foldl(table, any, (term, any -> any)) :: any

Fold the given table from the left, see dets:foldl.

foldr(table, acc, fun)

Specs

foldr(table, any, (term, any -> any)) :: any

Fold the given table from the right, see dets:foldr.

info(table)

Specs

info(table) :: Keyword.t | nil
info(table, key)

Specs

info(table, atom) :: term | nil
keys(table)

Specs

keys(table) :: [term]

Get the keys in the given table.

match(table, pattern)

Specs

match(table, any) :: Dexts.Selection.t | nil

Match terms from the given table with the given pattern, see dets:match.

match(table, pattern, list)

Specs

match(table, any | integer, Keyword.t | any) ::
  Dexts.Selection.t |
  nil

Match terms from the given table with the given pattern and options, see dets:match.

Options

  • :whole when true it returns the whole term.
  • :delete when true it deletes the matching terms instead of returning them.
  • :limit the amount of elements to select at a time.
new(name, options \\ [])
new!(name, options \\ [])
next(table, key)

Specs

next(table, any) :: any | nil

Get the next key in the given table, see dets:next.

open(path)
open!(path)
read(table, key)
save(table)

Specs

save(table) :: :ok | {:error, term}

Synchronize the table to disk, see dets:sync.

select(table, match_spec, options \\ [])

Select terms in the given table using a match_spec, see dets:select.

write(table, object, options \\ [])

Specs

write(table, term, Keyword.t) :: boolean

Write the given term to the given table optionally disabling overwriting, see dets:insert and dets:insert_new.