Get

How to get Record content and information.

Get Record From Tag

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

tag

The Record's tag

String

Get Record Information

Content

db.get('tag').content

Path

db.get('tag').path
db.get('tag').realpath

Tag

db.get('tag').tag

Get Database Name

Names are derived from the directory's base name or can manually be set in config object when initializing.

db.name

Get Record from Value

This checks if the record content is exactly the value param

db.getFromValue('value')
Parameter
About
Type
Required

value

The value to get from

String

exact

Exact match?

Boolean

Get from Key/Value pair

JSON Only

This function iterates all records to find any with the matching key/value pair you provided.

db.getFromKeyValue('key', 'value', exact)

Check if a Record exists

This will only return true or false.

db.has('tag')
Parameter
About
Type
Required

tag

The tag to check for

String

Get All Records

db.getAll({tagOnly:false, limit:10, filter})
Parameter
About
Type
Required

options.tagOnly

Set to true to return an array of tags instead of Records

Boolean

options.limit

Max results

Number

options.filter

Filter results

Function

Last updated