/usr/lib/swipl/library/ext/bdb/bdb.pl
All Application Manual Name SummaryHelp

  • bdb
    • bdb.pl -- Berkeley DB interface
      • bdb_init/1
      • bdb_init/2
      • bdb_close_environment/1
      • bdb_current_environment/1
      • bdb_environment_property/2
      • bdb_open/4
      • bdb_close/1
      • bdb_put/3
      • bdb_del/3
      • bdb_delall/3
      • bdb_get/3
      • bdb_enum/3
      • bdb_getall/3
      • bdb_current/1
      • bdb_closeall/0
      • bdb_transaction/1
      • bdb_transaction/2
      • bdb_version/1
 bdb_get(+DB, ?Key, -Value) is nondet
Query the database. If the database allows for duplicates this predicate is non-deterministic, otherwise it is semidet. Note that if Key is a term this matches stored keys that are variants of Key, not unification. See =@=/2. Thus, after bdb_put(DB, f(X), 42), we get the following query results:
  • bdb_get(DB, f(Y), V) binds Value to 42, while Y is left unbound.
  • bdb_get(DB, f(a), V) fails.
  • bdb_enum(DB, f(a), V) succeeds, but does not perform any indexing, i.e., it enumerates all key-value pairs and performs the unification.