The following conventions are used in the predicate descriptions below.
- The predicates that create and open databases can be given a list of options.
An Option is one of:
The mapsize, or size limit, of the database being created, in MiB.
The default is 10MiB.
The UNIX permission for files of the database being created. Ignored for Windows.
The default is octal 664.
The access mode for the database being opened. One of the atoms
read (the default), no updates are allowed.
- DBRef is a reference to an open database.
It is returned when the database is opened. The reference becomes
invalid after the database has been closed.
The reference corresponds to the LMDB environment notion.
physically consists of a directory containing the files needed to enable
sharing databases between processes.
- TermRef is a reference to a term in a given database.
The reference is returned when a term is stored. The reference
stays valid even after the database has been closed and hence can
be stored permanently as part of another term. However, if such
references are stored in the database, automatic compression of
the database (using
lmdb_compress/[2,3]) is not possible, in
that case the user has to write their own compressing predicate.
- SpecList is a description of the indexing scheme;
see The DB-Spec.
- Term is any Prolog term.
- Iterator is a non-backtrackable mutable object. It can be
used to iterate through a set of terms stored in a database.
The iterators are unidirectional.
Send feedback on this subject.