Dubnium
v3
v3
  • Overview
  • API
    • Initialize
    • Manage
    • Get
    • Edit
    • Search
    • Miscellaneous
    • Middleware
    • Versioning
  • TEMPLATES
    • JSON
    • String
  • EXTENSIONS
    • Setup
    • Create
    • Find
  • OTHER
  • CLI
  • Events
  • Update Log
  • EXTERNAL LINKS
    • Need more help?
    • Report an Issue
Powered by GitBook
On this page
  • Get Record From Tag
  • Get Record Information
  • Content
  • Path
  • Tag
  • Get Database Name
  • Get Record from Value
  • Get from Key/Value pair
  • Check if a Record exists
  • Get All Records

Was this helpful?

  1. API

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
db.read('tag')

Path

db.get('tag').path
db.get('tag').realpath
db.locate('tag', realpath)
Parameter
About
Type
Required

tag

Record's tag

string

realpath

Return realpath

bool

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

PreviousManageNextEdit

Last updated 1 year ago

Was this helpful?