QuestDB JavaScript Client - v5.0.0
    Preparing search index...

    Browser-safe QWP egress session.

    The server currently executes one query at a time per connection, so this session deliberately rejects a query issued while another is still running. A query whose caller has already been released -- abandoned, or past its timeout -- may still be draining on the connection; a new query waits for that rather than failing. A completed query's materialized batches may still be consumed while the next query runs.

    Implements

    • QwpEgressQueryControl
    Index

    Properties

    ready: Promise<QwpServerInfoMessage>

    Initial SERVER_INFO; use serverInfo for the current post-failover snapshot.

    Accessors

    • get metrics(): QwpEgressMetrics

      Immutable notification-inbox counters for this session's reconnect observer, the egress counterpart of QwpSender.metrics.ingress.

      A reconnect.onEvent observer runs on a bounded inbox that drops its oldest pending entry under overflow, exactly as ingress does. Nothing reported those drops, and no gap in the delivered stream reveals them either, because attempt resets to one on every success: six outages that discarded eleven events were indistinguishable from a healthy two. A non-zero drop count means the observer is not keeping up.

      Returns QwpEgressMetrics

    Methods

    • Parameters

      • requestId: bigint
      • additionalBytes: number | bigint
      • replayOnReconnect: boolean = true
      • acceptWhenReconnectStarts: boolean = false

      Returns Promise<void>

    • Internal

      Cancels and drains an active operation before a pooled lease is returned. False means the physical session is no longer safe to reuse.

      A query() of the lease that has not started yet -- still waiting for SERVER_INFO, or for an abandoned query to drain -- rejects with abandonStart() instead. Left waiting, it started as soon as the drain below finished, on a session the pool was handing to its next borrower, whose own query() then failed because one was already active.

      Parameters

      • abandonStart: () => Error

      Returns Promise<boolean>

    • Internal

      Best-effort cancellation followed by physical connection teardown for facade shutdown. Unlike pooled lease return, this does not wait for the server to finish draining the cancelled query.

      Returns Promise<void>