@earth-app/collegedb
    Preparing search index...

    Function runAllShards

    • Executes a query on all shards and returns the results from each shard.

      This function is useful for scenarios where you need to aggregate data from multiple shards, such as running analytics or cross-shard queries. It executes the same SQL statement on each shard and collects the results.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • sql: string

        The SQL statement to execute on each shard

      • bindings: any[] = []

        Parameter values to bind to the SQL statement

      • batchSize: number = 50

        Number of concurrent queries to run at once (default: 50)

      Returns Promise<D1Result<T>[]>

      Promise resolving to an array of results from each shard

      1.0.4