For the complete documentation index, see llms.txt. This page is also available as Markdown.

Versioning

Structure

The files are stored in DATABASE/.versions/TAG/DATE and the file contents are identical to the Record.

Limit Versions

When initializing, add limit:number to the versioning object to limit the number of stored versions.

const db = new Dubnium('dir', 'txt', { versioning:{ enabled:true, limit:10 } })

Read A Version

db.get('tag').getVersion('date')
Parameter
About
Type
Required

tag

Record tag

String

date

Date of version

String (ISO date)

Manually Save Snapshot

This allows you to create a version at any point in time, even if automatic versioning is disabled or the limit has been reached.

db.get('tag').saveSnapshot()

Example

Generator

Rollback

Parameter
About
Type
Required

tag

Record tag

String

date

Date of version

String (ISO date)

Last updated