Did you know ... Search Documentation:
Pack dynworks -- prolog/dynvector_persistence.pl
PublicShow source

This module provides persistence for dynvector objects, using the Berkeley DB utility package. For details on the SWI-Prolog interface to Berkeley DB, please refer to the documentation for bdb_rapper.pl .

author
- GT Nunes
version
- 1.3.2
license
- BSD-3-Clause License
 dynvector_clone(+IdSource, +IdTarget) is det
Clone a dynvector.
Arguments:
IdSource- Atom identifying the source dynvector
IdTarget- Atom identifying the target dynvector
 dynvector_serialize(+Id, ?Serialized) is det
A serialization mechanism, for backup/restore purposes. The description below applies for a given dynvector containing Nv values and Nb labels.
Its serialization structure will be:
  <Nb>,<br/>
  [<key-label-1>,<value-label-1>],...,[<key-label-Nb>,<value-label-Nb>],<br/>
  [<index-1>,<value-1>],...,[<index-Nv>,<value-Nv>]

The serialized list will thus contain `Np + Nv + 1` elements:<br/>
  <num-labels>    - the total number of key-value label pairs<br/>
  <key-label-j>   - the key in the key-value label pair `j`<br/>
  <value-label-j> - the value in the key-value label pair<br/>
  <index-j>       - the index position of value `j` within the dynvector<br/>
  <value-j>       - the value `j` within the dynvector
Arguments:
Id- Atom identifying the dynvector
Serialized- Serialization list containing the dynvector data
 dynvector_persist(+Id:atom, +DataSet:atom) is det
Persist the dynvector data to a Berkeley DB external storage.
Arguments:
Id- Atom identifying the dynvector
DataSet- Atom identifying the data set
 dynvector_restore(+Id, +DataSet) is det
Restore the dynvector data from a Berkeley DB external storage
Arguments:
Id- Atom identifying the dynvector
DataSet- Atom identifying the data set
 dynvector_erase(+Id:atom, +DataSet:atom) is det
Erase the dynvector persisted data.
Arguments:
Id- Atom identifying the dynvector
DataSet- Atom identifying the data set