ets_al v0.1.0 EtsAl.Keeper View Source

ETS Abstraction Layer Generic abstraction layer for ETS operations.

Acts as an assets holder for ETS tables to let them survive crashes.

Should be started under the App's supervisor.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Clear a table under the Keeper's PID (ownership)

Create a table under the Keeper's PID (ownership)

Delete a table under the Keeper's PID (ownership)

Read a table from the dump and create it under the Keeper's PID (ownership)

Insert a key in the ETS table

Insert new key into the ETS table

List tables under the Keeper's PID (ownership)

Dump table contents to the list

Update a key in the ETS table

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Clear a table under the Keeper's PID (ownership)

Link to this function

create_public_bag(table_id) View Source

Link to this function

create_public_ordered_set(table_id) View Source

Link to this function

create_public_set(table_id) View Source

Link to this function

create_table(table_id, table_spec) View Source

Create a table under the Keeper's PID (ownership)

Delete a table under the Keeper's PID (ownership)

Link to this function

fetch_range(table_id, start_key, limit) View Source

Link to this function

file2tab(table_id, file_path) View Source

Read a table from the dump and create it under the Keeper's PID (ownership)

Link to this function

insert(table_id, key, values) View Source

Insert a key in the ETS table.

Returns:

{:ok, true} on success,

{:error, description} in case of error.

Link to this function

insert_new(table_id, key, values) View Source

Insert new key into the ETS table.

Returns:

{:ok, true} on success,

{:ok, false} if key already exists,

{:error, description} in case of error.

Link to this function

key_exists?(table_id, key) View Source

List tables under the Keeper's PID (ownership)

Link to this function

select(table_id, match_spec) View Source

Link to this function

select(table_id, match_spec, limit) View Source

Link to this function

select_delete(table_id, match_spec) View Source

Link to this function

tab2file(table_id, file_path) View Source

Dump a table

Dump table contents to the list

Link to this function

update(table_id, key, values) View Source

Update a key in the ETS table.

Returns:

{:ok, true} on success,

{:ok, false} if key does not exists in the table,

{:error, description} in case of error.