Interface KeyValueInterface

Represents a key-value interface for a database.

Hierarchy

  • KeyValueInterface

Properties

Properties

delete: ((key) => Promise<boolean>)

Type declaration

    • (key): Promise<boolean>
    • Deletes a value by its key

      Parameters

      • key: string

      Returns Promise<boolean>

dump: (() => Promise<any>)

Type declaration

    • (): Promise<any>
    • Dumps the entire database

      Returns Promise<any>

get: ((key) => Promise<any>)

Type declaration

    • (key): Promise<any>
    • Gets a value by its key

      Parameters

      • key: string

      Returns Promise<any>

load: ((data) => Promise<void>)

Type declaration

    • (data): Promise<void>
    • Loads data into the database

      Parameters

      • data: any

      Returns Promise<void>

set: ((key, value) => Promise<void>)

Type declaration

    • (key, value): Promise<void>
    • Sets a value by its key

      Parameters

      • key: string
      • value: any

      Returns Promise<void>