@qualithm/arrow-flight-sql-js - v0.4.3
    Preparing search index...

    Function withRetry

    • Execute a function with automatic retries on transient failures.

      Type Parameters

      • T

      Parameters

      • operation: () => Promise<T>

        The async function to execute

      • options: RetryOptions = {}

        Retry configuration

      Returns Promise<RetryResult<T>>

      The result of the operation

      The last error if all retries are exhausted

      const result = await withRetry(
      async () => await client.query("SELECT 1"),
      { maxRetries: 3, initialDelayMs: 100 }
      )