Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IWriter<T, K>

Interface for data processing components that can create, update and delete data items.

Type parameters

  • T

  • K

Hierarchy

  • IWriter

Implemented by

Index

Methods

create

  • create(correlation_id: string, item: T, callback?: function): void
  • Creates a data item.

    Parameters

    • correlation_id: string

      (optional) transaction id to trace execution through call chain.

    • item: T

      an item to be created.

    • Optional callback: function

      (optional) callback function that receives created item or error.

        • (err: any, item: T): void
        • Parameters

          • err: any
          • item: T

          Returns void

    Returns void

deleteById

  • deleteById(correlation_id: string, id: K, callback?: function): void
  • Deleted a data item by it's unique id.

    Parameters

    • correlation_id: string

      (optional) transaction id to trace execution through call chain.

    • id: K

      an id of the item to be deleted

    • Optional callback: function

      (optional) callback function that receives deleted item or error.

        • (err: any, item: T): void
        • Parameters

          • err: any
          • item: T

          Returns void

    Returns void

update

  • update(correlation_id: string, item: T, callback?: function): void
  • Updates a data item.

    Parameters

    • correlation_id: string

      (optional) transaction id to trace execution through call chain.

    • item: T

      an item to be updated.

    • Optional callback: function

      (optional) callback function that receives updated item or error.

        • (err: any, item: T): void
        • Parameters

          • err: any
          • item: T

          Returns void

    Returns void

Generated using TypeDoc