:- use_module(library(persistency)).(can be autoloaded)
- Database is reloaded from file if the file was modified since loaded.
reload, but use incremental loading if possible. This allows for two processes to examine the same database file, where one writes the database and the other periodycally calls
db_sync(update)to follow the modified data.
- Database was re-written, deleting all retractall statements. This is the
- GC DB if the number of deleted terms is the given percentage of the total number of terms.
- Database stream was closed
- Remove all registered persistency for the calling module
- No-operation performed
With unbound What, db_sync/1 reloads the database if it was modified on disk, gc it if it is dirty and close it if it is opened.