Wobserver v0.1.7 Wobserver.Table

Table (ets) information and listing.

Summary

Functions

Creates an overview of table information based on the given table atom or number

Lists all tables with basic information

Sanitizes a table name and returns either the table id or name

Functions

info(table, include_data \\ false)
info(table :: atom | integer, include_data :: boolean) :: map

Creates an overview of table information based on the given table atom or number.

If include_data is set to true, it will also contain the table data.

list()
list() :: [map]

Lists all tables with basic information.

Note: data is not included.

sanitize(table)
sanitize(table :: atom | integer | String.t) ::
  atom |
  integer

Sanitizes a table name and returns either the table id or name.

Example:

iex> Wobserver.Table.sanitize :code
:code
iex> Wobserver.Table.sanitize 1
1
iex> Wobserver.Table.sanitize "code"
:code
iex> Wobserver.Table.sanitize "1"
1