Options
All
  • Public
  • Public/Protected
  • All
Menu

Client of Serrea API.

Hierarchy

  • IQueryClient

Index

Methods

  • Runs a query in stream mode, with callbacks instead of having to wait for the response to finish to get the data. Only the from date is required. The to date is optional. The stream will be left open if the "to" date is falsy.

    remarks

    cbData callback will be triggered after every new single query row is received. cbError returns any possible error. It's a terminal event cbDone is called when only when dateTo is passed. It's a terminal event. cbDone won't be called if dateTo is falsy because the stream will never end!

    Parameters

    • query: StreamQuery

      Devo query to run. See StreamQuery type for details.

    • cbData: ((data: QueryClientResponseData) => void)

      callback to process every event of data

    • cbProgress: ((progress: QueryClientResponseProgress) => void)

      callback to process progress of the response. It is an array that contains only a number (the eventdate being processed). This event is not called very often, you will see it only in large queries.

    • cbError: ((error: Error) => void)

      callback to process error. This will be the last event in case of failure.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    • cbDone: (() => void)

      callback to let the consumer know that the query has finished responding. This will be the last event in case of success.

        • (): void
        • Returns void

    Returns (() => void)

      • (): void
      • Runs a query in stream mode, with callbacks instead of having to wait for the response to finish to get the data. Only the from date is required. The to date is optional. The stream will be left open if the "to" date is falsy.

        remarks

        cbData callback will be triggered after every new single query row is received. cbError returns any possible error. It's a terminal event cbDone is called when only when dateTo is passed. It's a terminal event. cbDone won't be called if dateTo is falsy because the stream will never end!

        Returns void

Generated using TypeDoc