Create

In Database

db.create('tag', content, ttl)
Parameter
About
Type
Required

tag

The new Record's tag

String

content

The Record's content

Any

ttl

Record's time to live

Number

TTL

When you create a Record, you can set a TTL for that Record.

Monitor TTL

By default, Dubnium will only check TTL when you read a Record. However, you can call monitorTTL() to auto check TTL. However, this will read metadata for all Records.

db.monitorTTL(interval)
Parameter
About
Type

interval

Interval of time for checking

Number

Stop Monitoring

clearInterval(db.ttlInterval)

Record Class

onst Record = require("dubnium/record")
new Record( path, dbInstance )
Parameter
About
Type
Required

path

File path

String

dbInstance

Dubnium instance

Dubnium

Clone

Parameter
About
Type
Required

target

Target directory to clone the record in.

String

Last updated