Constructors

Properties

context: any
path: string
status: string

Methods

  • Returns AsyncGenerator<any[], void, unknown>

  • Parameters

    • start: any
    • end: any

    Returns Promise<unknown>

  • Parameters

    Returns Promise<boolean>

  • Delete all entries or a range.

    Parameters

    Returns Promise<unknown>

  • Closes the database.

    Returns Promise<unknown>

    Resolves when the database has been opened.

  • Parameters

    • start: any
    • end: any

    Returns Promise<unknown>

  • Parameters

    • key: string | Buffer<ArrayBufferLike>
    • Optionaloptions: OpOpts

    Returns Promise<boolean>

  • Parameters

    • key: string | Buffer<ArrayBufferLike>
    • Optionaloptions: OpOpts

    Returns Promise<null | Buffer<ArrayBufferLike>>

  • Parameters

    • key: string | Buffer<ArrayBufferLike>
    • Optionaloptions: OpOpts

    Returns Promise<string>

  • Creates a new iterator with the specified options.

    Parameters

    • Optionaloptions: IterOpts

      Iterator options

    Returns Iterator

  • Parameters

    • property: any

    Returns any

  • Returns boolean

  • Opens the database.

    Returns Promise<unknown>

    Resolves when the database has been opened.

  • Parameters

    • key: string | Buffer<ArrayBufferLike>
    • value: string | Buffer<ArrayBufferLike>
    • Optionaloptions: OpOpts

    Returns Promise<boolean>

  • destroy() is used to completely remove an existing LevelDB database directory. You can use this function in place of a full directory rm if you want to be sure to only remove LevelDB-related files. If the directory only contains LevelDB files, the directory itself will be removed as well. If there are additional, non-LevelDB files in the directory, those files, and the directory, will be left alone. The callback will be called when the destroy operation is complete, with a possible error argument.

    Parameters

    • location: any

    Returns Promise<unknown>

  • repair() can be used to attempt a restoration of a damaged LevelDB store. From the LevelDB documentation:

    If a DB cannot be opened, you may attempt to call this method to resurrect as much of the contents of the database as possible. Some data may be lost, so be careful when calling this function on a database that contains important information.

    You will find information on the repair operation in the LOG file inside the store directory.

    A repair() can also be used to perform a compaction of the LevelDB log into table files.

    Parameters

    • location: string

    Returns Promise<unknown>

  • Parameters

    • key: any

    Returns string | Buffer<ArrayBufferLike>

  • Parameters

    • value: any

    Returns string | Buffer<ArrayBufferLike>