gitty_driver_bdb.pl -- Gitty BDB driver
This version of the driver uses library(bdb), the BerkeyDB database. This driver is particularly suited for large numbers of files. The store uses less disk space and starts much faster on large numbers of files.
The BDB database file contains two databases:
heads
maps a file name to the hash of the last objectobjects
contains the object blobs.
- gitty_close(+Store) is det
- Close the BDB environment associated with a gitty store
- gitty_file(+Store, ?File, ?Head) is nondet
- True when File entry in the gitty store and Head is the HEAD revision.
- gitty_update_head(+Store, +Name, +OldCommit, +NewCommit) is det
- Update the head of a gitty store for Name. OldCommit is the
current head and NewCommit is the new head. If Name is created,
and thus there is no head, OldCommit must be
-
.This operation can fail because another writer has updated the head. This can both be in-process or another process.
- delete_head(+Store, +Name) is det
- Delete the named head.
- set_head(+Store, +File, +Hash) is det
- Set the head of the given File to Hash
- load_plain_commit(+Store, +Hash, -Meta:dict) is semidet
- Load the commit data as a dict. Fails if Hash does not exist or is not a commit.
- store_object(+Store, +Hash, +Header:string, +Data:string) is det
- Store the actual object. The store must associate Hash with the concatenation of Hdr and Data.
- load_object(+Store, +Hash, -Data, -Type, -Size) is det
- Load an object given its Hash. Data holds the content as a string, Type is the object type (an atom) and Size is the size of the object in bytes.
- gitty_hash(+Store, ?Hash) is nondet
- True when Hash is an object in the store.
- delete_object(+Store, +Hash)
- Delete an existing object