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

    Browser-safe high-level QWP ingress API.

    Applications normally obtain this class through create/connectQwpNodeSender or create/connectQwpBrowserSender, rather than constructing sessions and QwpTableBuffer instances themselves.

    Index

    Accessors

    Methods

    • Internal

      Closes the sender on behalf of the pooled QWP client, best effort. A failure -- typically a close drain that timed out with frames still unacknowledged -- is logged as a warning instead of rejecting, as the Java, Rust and Python pools do, so neither pool shutdown nor the lease whose return triggered the close fails because of it.

      Returns Promise<void>

    • Adds a QuestDB DATE column value in milliseconds since the epoch. -9_223_372_036_854_775_808n is QuestDB's DATE NULL sentinel: it is stored as NULL and cannot be stored as an ordinary value.

      Parameters

      • name: string
      • millisecondsSinceEpoch: number | bigint

      Returns QwpSender

    • Publishes completed rows to the local ingress/replay boundary without waiting for a server ACK. Use flushAndWait() to also wait for the ACK. A transactional sender commits here: rows previously sent by auto-flush and any pending rows close in one group-closing frame.

      Returns Promise<boolean>

    • Publishes pending rows without waiting for their server ACK and returns the highest frame sequence published by this call, or -1n when it published nothing. Pass the result to waitForAck() to wait for that frame; flushAndWait() waits for everything published so far.

      Returns Promise<bigint>

    • Flushes pending rows, then waits until the server has acknowledged every frame this sender has published, including the frames a store-and-forward journal recovered from an earlier process once the sender has connected. Resolves true once they are acknowledged and false when the ACK watermark makes no progress for timeoutMs (the session's ackTimeoutMs, 15 seconds by default); the timeout restarts whenever the watermark advances. As in the Java client's drain(), a timeoutMs of zero or less flushes and then checks without waiting. After false the frames remain queued and are still delivered, so do not publish them again. Rejects when the server rejects a frame or the session can no longer deliver. With durable ACK requested, the wait covers durable upload. A transactional sender commits its open transaction first. Over UDP, which has no server acknowledgements, this resolves true once the datagrams are sent.

      Parameters

      • OptionaltimeoutMs: number

      Returns Promise<boolean>

    • Adds a protocol LONG[] column value with between 1 and 32 dimensions.

      Current QuestDB servers reject LONG-array ingestion with long arrays are not supported, only double arrays. This method remains available for Java-client and protocol parity.

      Parameters

      • name: string
      • value: unknown[]

      Returns QwpSender

    • Adds a QuestDB LONG column value. -9_223_372_036_854_775_808n is QuestDB's LONG NULL sentinel: it is stored as NULL and cannot be stored as an ordinary value.

      Parameters

      • name: string
      • value: number | bigint

      Returns QwpSender

    • Internal

      Flushes completed rows and resets borrower-local staging without closing the physical session. Used by the pooled QWP client when a lease returns.

      Returns Promise<void>

    • Waits until the cumulative ACK watermark covers a frame sequence, such as one returned by flushAndGetSequence(). Resolves true once it does, and false when the watermark makes no progress for timeoutMs (the session's ackTimeoutMs by default); the timeout restarts whenever the watermark advances, and after false the frames remain queued for delivery. As in the Java client's awaitAckedFsn(), a timeoutMs of zero or less checks without waiting. Rejects when the server rejects a covered frame or the session can no longer deliver.

      Parameters

      • targetSequence: bigint
      • OptionaltimeoutMs: number

      Returns Promise<boolean>