Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DatabaseInterface

Hierarchy

  • DatabaseInterface

Implemented by

Index

Methods

flush

  • flush(): Promise<void>

init

  • init(): Promise<void>
  • Init the database with state stored in the cache file.

    Calling init is not mandatory, but is required for any form of non-volatile storage

    Returns Promise<void>

read

  • read(path: string): Promise<Object>
  • Read data from the "node" described by path where path uses "/" to separate nodes

    null is returned if there is no data at path

    Parameters

    • path: string

    Returns Promise<Object>

toString

  • toString(): Object

write

  • write(path: string, toWrite: Object): Promise<void>
  • Write data to the node described by path where path once again uses "/" separate nodes

    toWrite can be any plain JavaScript object (e.g anything that can be serialized with JSON.stringify)

    An exception is thrown if the write fails

    Parameters

    • path: string
    • toWrite: Object

    Returns Promise<void>

Generated using TypeDoc