Interface StorageService<T>

Abstract Concept of StorageService

  • simplified storage-service for NoSQL data.

Type Parameters

Hierarchy

  • StorageService

Implemented by

Methods

  • increment number attribute (or overwrite string field)

    • NOTE! increments only number type.

    Parameters

    • id: string

      unique-id

    • model: T

      data (ONLY number is supportable)

    • Optional $update: T

      (optional) update-set.

    Returns Promise<T>

  • read or create if not-found.

    Parameters

    • id: string

      unique-id

    • model: T

      auto creation if not-found.

    Returns Promise<T>

  • save (or create) of model.

    • WARN! overwrite if exists

    Parameters

    • id: string

      unique-id

    • model: T

      data.

    Returns Promise<T>

  • update some attributes of model

    • NOTE! it will create if not exist.

    Parameters

    • id: string

      unique-id

    • model: T

      data

    • Optional incrementals: T

      (optional) incrementals like count = count + 1

    Returns Promise<T>

Generated using TypeDoc