# Module pdb_ets

- Description
- Data Types
- Function Index
- Function Details

DB for a process internal state (lika a gen_component).

Copyright © 2010-2013 Zuse Institute Berlin

Version: $Id$

Behaviours: `pdb_beh`.

Authors: Florian Schintke (`schintke@zib.de`).

## Description

DB for a process internal state (lika a gen_component). This abstraction allows for easy switching between erlang:put/get/erase and ets:insert/lookup/delete

## Data Types

### tableid()

    tableid() = ets:tid() | atom()

## Function Index

delete/2 |
get/2 |
new/2 |
set/2 |
tab2list/1 |
take/2 |

## Function Details

### new/2

    new(TableName :: atom(),
        Params ::
            [set |
             ordered_set |
             bag |
             duplicate_bag |
             public |
             protected |
             private |
             named_table |
             {keypos, integer()} |
             {heir, pid(), term()} |
             {heir, none} |
             {write_concurrency, boolean()}]) ->
           tableid()

### get/2

    get(Key :: term(), TableName :: tableid()) -> tuple() | undefined

### set/2

    set(NewTuple :: tuple(), TableName :: tableid()) -> ok

### delete/2

    delete(Key :: term(), TableName :: tableid()) -> ok

### take/2

    take(Key :: term(), TableName :: tableid()) -> term() | undefined

### tab2list/1

    tab2list(TableName :: tableid()) -> [term()]

Generated by EDoc, Feb 29 2016, 16:12:17.