Module key_val_db

Data Types

key_val_db()

key_val_db() = [{Key, Val}]

Primitive format of 'internal' database.

Function Index

add/2Equivalent to add(DB, Key, none).
add/3 Add new entry to DB.
find/2 Retrive the value of Key if it is contained in DB.
new/0 Create a new key_val_db.
new/1 Create a new key_val_db with content.
rm/2 Delete a Key-Val pair from DB.
to_key_val/1 Turn one of our internal format databases into a list of key-value tuples.

Function Details

add/2

add(DB, Key) -> DB

throws {error, duplicate_key}

Equivalent to add(DB, Key, none).

add/3

add(DB, Key, Value) -> DB

throws {error, duplicate_key}

Add new entry to DB.

find/2

find(DB, Key) -> [term()] | []

Retrive the value of Key if it is contained in DB.

new/0

new() -> key_val_db()

Create a new key_val_db.

new/1

new(KeyValList) -> key_val_db()

Create a new key_val_db with content.

rm/2

rm(DB, Key) -> key_val_db()

Delete a Key-Val pair from DB.

to_key_val/1

to_key_val(DB) -> KeyValList

Turn one of our internal format databases into a list of key-value tuples.


Generated by EDoc, Oct 17 2007, 16:48:25.