Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SearchDefinition

Parameters that define a repeatable Search.

Hierarchy

  • SearchDefinition

Implements

  • IDbStorable

Index

Constructors

constructor

  • new SearchDefinition(name?: string, siteNames?: string[], tags?: string[]): SearchDefinition

Properties

createdAt

createdAt: Date = ...

firstNames

firstNames: string[] = ...

history

history: Search[] = ...

id

id: string

includedSites

includedSites: Site[] = ...

lastEditedAt

lastEditedAt: Date = ...

lastNames

lastNames: string[] = ...

name

name: string

rev

rev: string = ''

tags

tags: string[]

userNames

userNames: string[] = ...

Static cache

cache: DbCache<SearchDefinition> = ...

Static Private idForDefaultName

idForDefaultName: number = 0

Accessors

completedHistory

  • get completedHistory(): Search[]

definitions

  • get definitions(): {}

lastRun

  • get lastRun(): null | Search

lastRunAt

  • get lastRunAt(): null | Date

Methods

clear

  • clear(): Promise<void>
  • Remove all executions of this search from history.

    Returns Promise<void>

new

  • Return a fresh execution of this search.

    The search must still be started via start().

    Returns Promise<Search>

remove

  • remove(): Promise<void>
  • Remove the search definition and all executions from the database.

    Returns Promise<void>

save

  • save(): Promise<Response>
  • Save/update this search definition in the database.

    Don't call this unless you've made changes! Each call will create a revision and take up space.

    Returns Promise<Response>

serialize

  • serialize(): SearchDefinitionSchema
  • Returns SearchDefinitionSchema

Static deserialize

Static loadAll

  • Load all SearchDefinitions from the database into the SearchDefinition.cache.

    Returns an array of the requested definitions. All loaded definitions (including ones loaded by other requests) can be accessed via SearchDefinition.cache.

    Parameters

    • Optional idPrefix: string

    Returns Promise<SearchDefinition[]>

Generated using TypeDoc