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
  • Search Tags
  • Search all Records by Content
  • Search Content
  • Search Object Keys

Was this helpful?

  1. API

Search

How to search your database.

PreviousEditNextMiscellaneous

Last updated 1 year ago

Was this helpful?

Search Tags

db.list({filter:() => e.tag == "TAG", limit:10})
Parameter
About
Type
Required

options.filter

Filter function

Function

options.limit

Max results

Number

Search all Records by Content

db.getFromValue('query', limit)
Parameter
About
Type
Required

query

Query to search for

String

limit

Max results

Number

Search Content

Convert content to String and return the result of

db.get("tag").search('query')

This function is deprecated

Have Dubnium split the content by a character and then search the array.

db.get('tag').searchAsArray('query', 'splitBy')
Parameter
About
Type
Required

splitBy

String to split the Record's content by. For example, \n for lines or " " for spaces. If not present, Dubnium will default to space.

String

Search Object Keys

JSON Only

This function searches object keys only.

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

query

The search query

String

String.search()