key_exists()
is renamedhas_key()
frame_exists()
is renamedhas_frame()
init()
now takes two parameters, the second one is a DSN (data name source, to use a SQL store instead of a pairtree)version()
is renameddataset_version()
to get the dataset version used for the libraryclone()
,clone_sample()
now include dsn parameters after the collection names, you can clone into a different storage engine (e.g. Pairtree or SQL store).
delete()
removes all versions of an objectprune()
removes all attachment versionspath()
will return the path to a JSON document for collections using pairtree storage, otherwise it'll return an empty string
Versioning is handle very differently in dataset v2.x than v1.x. The JSON objects stored can be versioned automatically based on the collection's versioning setting. Versions are incremented automatically on create, update and attach for both JSON documents and attachments. Both delete()
and prune()
remove all objects including all versions of objects. This is because systems that version things tend to need "tomb stone" objects and placeholders.
read_version()
will retrieve a specific version of a JSON objectobject_versions()
will retrieve a list of object versions availableattachment_versions()
will list of versions of an attachmentdetach_version()
will retrieve a specific version of an attachmentset_versioning()
will set versioning for a collectionget_versioning()
will get the current versioning setting for a collection
The methods related to Namaste data have not be implememented as v2 of dataset. Instead retrieve the codemeta.json file in the collection for metadata about the collection itself.
Some tests fail on Windows 10 for libdataset. These will be addressed in future releases.