next up previous contents index
Next: 6.13.2.2 Backtrackable Updates Up: 6.13.2 The storage Module: Previous: 6.13.2 The storage Module:   Contents   Index

6.13.2.1 Non-backtrackable Storage

storage_insert_keypair(+StorageName,+Key, +Value, ?Inserted)

Insert the given Key-Value pair into StorageName. If the pair is new, then Inserted unifies with 1. If the pair is already in StorageName, then Inserted unifies with 0. If StorageName already contains a pair with the given key that is associated with a different value, then Inserted unifies with -1. The first argument, StorageName, must be an atom naming the storage to be used. Different names denote different storages. In all cases the predicate succeeds.

storage_delete_keypair(+StorageName, +Key, ?Deleted)

Delete the key-value pair with the given key from StorageName. If the pair was in StorageName then Deleted unifies with 1. If it was not in StorageNames then Deleted unifies with 0. The first argument, StorageName, must be an atom naming the storage object to be used. Different names denote different storages. In both cases the predicate succeeds.

storage_find_keypair(+StorageName, +Key, ?Value)

If StorageName has a key pair with the given key, then Value unifies with the value stored in StorageName. If no such pair exists in the database, then the goal fails.

Note that this predicate works with non-backtrackable associative arrays described above as well as with the backtrackable ones, described below.

storage_insert_fact(+StorageName, +Fact, ?Inserted)

Similar to keypair insertion, but this primitive inserts facts rather than key pairs.

storage_delete_fact(+StorageName, +Fact, ?Inserted)

Similar to key-pair deletion, but this primitive deletes facts rather than key pairs.

storage_find_fact(+StorageName, +Fact)

Similar to key-pair finding, but this primitive finds facts facts rather than key pairs.


next up previous contents index
Next: 6.13.2.2 Backtrackable Updates Up: 6.13.2 The storage Module: Previous: 6.13.2 The storage Module:   Contents   Index
Terrance Swift 2007-10-05