Executes a query on all shards and returns all matching records from each shard.
This function is useful for scenarios where you need to retrieve all records
matching a query across multiple shards, such as aggregating data or running
cross-shard analytics.
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)
Executes a query on all shards and returns all matching records from each shard.
This function is useful for scenarios where you need to retrieve all records matching a query across multiple shards, such as aggregating data or running cross-shard analytics.