Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Store

Persistent store for non-operational data like state history. Most methods require a storage adapter to be loaded.

Hierarchy

  • Store

Index

Properties

Methods

Properties

excludes

excludes: string[] = ['bot']

Set keys to remove from data before keep.

Methods

find

  • find(collection: string, params?: any): Promise<any>
  • Query store for subset matching params, via adapter

    Parameters

    • collection: string
    • Default value params: any = {}

    Returns Promise<any>

findOne

  • findOne(collection: string, params: any): Promise<any>
  • Query store for single value matching params, via adapter

    Parameters

    • collection: string
    • params: any

    Returns Promise<any>

keep

  • keep(collection: string, data: any): Promise<void>
  • Keep serial data in collection, via adapter (converted to objects).

    Parameters

    • collection: string
    • data: any

    Returns Promise<void>

lose

  • lose(collection: string, params: any): Promise<void>
  • Remove anything from collection in storage that matches params

    Parameters

    • collection: string
    • params: any

    Returns Promise<void>

plainObject

  • plainObject(data: any): any
  • Convert instance to plain object for storage.

    Parameters

    • data: any

    Returns any

Generated using TypeDoc