Interface BaseResultSet<Stream, Format>

Type Parameters

Hierarchy

  • BaseResultSet

Implemented by

Properties

query_id: string

ClickHouse server QueryID.

response_headers: ResponseHeaders

Response headers.

Methods

  • Close the underlying stream.

    Returns void

  • The method waits for the all the rows to be fully loaded. When the response is received in full, it will be decoded to return JSON.

    Should be called only for JSON* formats family.

    The method should throw if the underlying stream was already consumed by calling the other methods, or if it is called for non-JSON formats, such as CSV, TSV etc.

    Type Parameters

    • T = unknown

    Returns Promise<ResultJSONType<T, Format>>

  • Returns a readable stream for responses that can be streamed.

    Formats that CAN be streamed (StreamableDataFormat):

    • JSONEachRow
    • JSONStringsEachRow
    • JSONCompactEachRow
    • JSONCompactStringsEachRow
    • JSONCompactEachRowWithNames
    • JSONCompactEachRowWithNamesAndTypes
    • JSONCompactStringsEachRowWithNames
    • JSONCompactStringsEachRowWithNamesAndTypes
    • CSV
    • CSVWithNames
    • CSVWithNamesAndTypes
    • TabSeparated
    • TabSeparatedRaw
    • TabSeparatedWithNames
    • TabSeparatedWithNamesAndTypes
    • CustomSeparated
    • CustomSeparatedWithNames
    • CustomSeparatedWithNamesAndTypes
    • Parquet

    Formats that CANNOT be streamed (the method returns "never" in TS):

    • JSON
    • JSONStrings
    • JSONCompact
    • JSONCompactStrings
    • JSONColumnsWithMetadata
    • JSONObjectEachRow

    Every iteration provides an array of Row instances for StreamableDataFormat format.

    Should be called only once.

    The method should throw if called on a response in non-streamable format, and if the underlying stream was already consumed by calling the other methods.

    Returns ResultStream<Format, Stream>

  • The method waits for all the rows to be fully loaded and returns the result as a string.

    It is possible to call this method for all supported formats.

    The method should throw if the underlying stream was already consumed by calling the other methods.

    Returns Promise<string>

Generated using TypeDoc