DBKV (dbkv v0.1.1) View Source

A disk-based key-value store built on top of :dets. Inspired by CubDB's intuitive API.

Link to this section Summary

Link to this section Functions

Link to this function

create_table(opts \\ [])

View Source

Specs

create_table(keyword()) :: :ok | {:error, any()}

Specs

delete(atom(), any()) :: :ok | {:error, any()}
Link to this function

delete_table(table_name)

View Source

Specs

delete_table(atom()) :: :ok | {:error, any()}
Link to this function

describe_table(table_name)

View Source

Specs

describe_table(atom()) :: map() | :undefined

Specs

exist?(atom()) :: boolean()
Link to this function

get(table_name, key, default \\ nil)

View Source

Specs

get(atom(), any(), any()) :: any()
Link to this function

has_key?(table_name, key)

View Source

Specs

has_key?(atom(), any()) :: boolean()
Link to this function

put(table_name, key, value)

View Source

Specs

put(atom(), any(), any()) :: :ok | {:error, any()}
Link to this function

put_new(table_name, key, value)

View Source

Specs

put_new(atom(), any(), any()) :: :ok | {:error, any()}
Link to this function

select_by_key_range(table_name, min_key, max_key, opts \\ [])

View Source

Specs

select_by_key_range(atom(), any(), any(), list()) :: list()
Link to this function

select_by_match_spec(table_name, match_spec)

View Source

Specs

select_by_match_spec(atom(), list()) :: list()
Link to this function

select_by_max_key(table_name, max_key, opts \\ [])

View Source

Specs

select_by_max_key(atom(), any(), list()) :: list()
Link to this function

select_by_max_value(table_name, max_value, opts \\ [])

View Source

Specs

select_by_max_value(atom(), any(), list()) :: list()
Link to this function

select_by_min_key(table_name, min_key)

View Source

Specs

select_by_min_key(atom(), any()) :: list()
Link to this function

select_by_min_value(table_name, min_value)

View Source

Specs

select_by_min_value(atom(), any()) :: list()
Link to this function

select_by_value_range(table_name, min_value, max_value, opts \\ [])

View Source

Specs

select_by_value_range(atom(), any(), any(), list()) :: list()

Specs

size(atom()) :: integer() | :undefined
Link to this function

update(table_name, key, default, fun)

View Source

Specs

update(atom(), any(), any(), (any() -> any())) :: :ok | {:error, any()}