leo_backend_db_ets

Handling database operation for ETS.

References

Description

Handling database operation for ETS

Function Index

close/1 Close a ets data store.
delete/2 Delete an object from the ets.
first/1 Retrieve a first record from the ets.
get/2 Retrieve an object from the ets.
open/1 Open a new ets datastore.
open/2  
prefix_search/4 Retrieve objects from ets by a keyword.
put/3 Insert an object into ets.
status/1 Get the status information for this ets.

Function Details

close/1

close(Table) -> ok

  • Table = atom()

Close a ets data store

delete/2

delete(Table, Key) -> ok | not_found | {error, any()}

  • Table = atom()
  • Key = binary()

Delete an object from the ets

first/1

first(Table) -> {ok, any()} | not_found | {error, any()}

  • Table = pid()

Retrieve a first record from the ets

get/2

get(Table, Key) -> not_found | {ok, binary()} | {error, any()}

  • Table = atom()
  • Key = binary()

Retrieve an object from the ets.

open/1

open(Table) -> ok

  • Table = atom() | string()

Open a new ets datastore

open/2

open(Table, Option) -> ok

  • Table = atom() | string()
  • Option = [atom()]

prefix_search/4

prefix_search(Table, Key, Fun, MaxKeys) -> {ok, list()} | not_found | {error, any()}

  • Table = pid()
  • Key = binary()
  • Fun = function()
  • MaxKeys = pos_integer()

Retrieve objects from ets by a keyword.

put/3

put(Table, Key, Value) -> ok | {error, any()}

  • Table = pid()
  • Key = binary()
  • Value = binary()

Insert an object into ets.

status/1

status(Table) -> [any()] | undefined

  • Table = atom()

Get the status information for this ets.