[ ECLiPSe Recorded Database built-in.|Group Index| Full Index]

erase_all(+Key)

All the the values associated with key Key are removed from the indexed database.

+Key
An atom or compound term.

Description

Used to remove all entries from the indexed database with the associated key Key. In the case of compound terms, all keys of the same name and arity are treated as equal.

Fail Conditions

None.

Resatisfiable

No.

Exceptions

(4) Instantiation fault
Key is uninstantaited.
(5) Type error
Key is neither an atom nor a compound term.

Examples


   Success:
   [eclipse]: record(whiskey,jameson),
   >        record(whiskey,bushmills),
   >        record(whiskey,glenfiddich),
   >        record(whiskey,dimple).
   yes.
   [eclipse]: erase_all(whiskey).
   yes.
   [eclipse]: recorded(whiskey,L).
   no (more) solution.
   Error:
   erase_all(Key).                  (Error 4)
   erase_all("key").                (Error 5)
   erase_all(1).                    (Error 5)


See Also

erase / 2