[ Recorded Database | Reference Manual | Alphabetic Index ]

recorded(+Key, ?Value, -DBRef)

Succeeds if the term Value has been recorded in the record database under the key Key and DBRef is its unique reference.
An atom or a compound term.
An arbitrary term.
A variable.


Used to find all values associated with a key. Value is unified with the first term that is associated with Key. DBRef is unified with the unique database reference of this database entry. In the case of compound terms, all keys of the same name and arity are treated as equal. If Value is instantiated, the instantiated term is used as a filter to reduce the number of terms returned by the recorded database and unified with Value, thus improving the speed of retrieving the term.

Backtracking will unify Value and DBRef with the value resp. the database reference of successive values associated with Key in the order in which they were recorded.

Modes and Determinism


This predicate is sensitive to its module context (tool predicate, see @/2).

Fail Conditions

Fails if nothing is recorded under the key Key


(4) instantiation fault
Key is not instantiated.
(5) type error
Key is neither atom, compound term, nor record handle.
(5) type error
DBRef is neither a variable nor a database reference.


   [eclipse]: recordz(beer, paulaner, _),
       recordz(beer, lowenbrau, _),
       recorded(beer, Value, Ref).
   Value = paulaner
   Ref = $&(dbref,"370gw3")
   Yes (0.00s cpu, solution 1, maybe more) ? ;

   Value = lowenbrau
   Ref = $&(dbref,"370gvr")
   Yes (0.00s cpu, solution 2, maybe more) ? 

   erase_all(beer),recorded(beer,guiness, Ref).

   recorded(Beer,Value,Ref).            (Error 4)
   recorded("beer",Value,Ref).          (Error 5)
   recorded(1,Value,Ref).               (Error 5)

See Also

recorda / 3, recordz / 3, erase / 1, is_handle / 1, referenced_record / 2