[ The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

Recorded Database

The record-family of built-ins to store data across failures

Predicates

current_record(?Key)
Succeeds if Key is the key of a recorded item.
erase(+DBRef)
Succeeds if the database reference DBRef designates a term recorded in the indexed database and this term is successfully erased.
erase(+Key, ?Value)
Succeeds if the term Value associated with key Key is removed as an entry in the indexed database.
erase_all(+Key)
All the the values associated with key Key are removed from the indexed database.
is_record(+Key)
Succeeds if Key is a key of a recorded item.
record(+Key, ?Value)
Records the term Value at the end of key Key in the indexed database.
recorda(+Key, ?Value)
Records the term Value at the beginning of key Key in the indexed database.
recorda(+Key, ?Value, -DBRef)
Records the term Value at the beginning of key Key in the indexed database.
recorded(+Key, ?Value)
Succeeds if the term Value has been recorded in the indexed database under the key Key.
recorded(+Key, ?Value, -DBRef)
Succeeds if the term Value has been recorded in the indexed database under the key Key and DBRef is its unique reference.
recorded_list(+Key, ?List)
Succeeds if the List is the list of all terms that are currently recorded in the indexed database under the key Key.
recordz(+Key, ?Value)
Records the term Value at the end of key Key in the indexed database.
recordz(+Key, ?Value, -DBRef)
Records the term Value at the end of key Key in the indexed database.
referenced_record(+DBRef, ?Value)
Succeeds if DBRef is the database reference of a currently recorded term and this term unifies with Value
rerecord(+Key, ?Value)
Erases all entries recorded under the key Key and replaces them with the given value Value.

Description

ECLiPSe provides several facilities to store information across backtracking. The following table gives an overview. If at all possible, the handle-based facilities (bags and shelves) should be preferred because they lead to cleaner, reentrant code (without global state) and reduce the risk of memory leaks.
    Facility        Type            Reference       See
    ================================================================
    shelves         array           by handle       shelf_create/2,3
    ----------------------------------------------------------------
    bags            unordered bag   by handle       bag_create/1
    ----------------------------------------------------------------
    stores          hash table      by handle       store_create/1
    ----------------------------------------------------------------
    named stores    hash table      by name         store/1
    ----------------------------------------------------------------
    non-logical     single cell     by name         variable/1
    variables
    ----------------------------------------------------------------
    non-logical     array           by name         array/1,2
    arrays
    ----------------------------------------------------------------
    records         ordered list    by name         record/1,2
    ----------------------------------------------------------------
    dynamic         ordered list    by name         dynamic/1,assert/1
    predicates
    ----------------------------------------------------------------

Generated from record.eci on Sat Aug 7 01:44:19 2004