function queryBatch
queryBatch(statements: Array<{ sql: string; args: InValue[]; }>): Promise<ResultSet[]>

Execute multiple read queries in a single round-trip using Turso batch API. Significantly reduces latency for remote databases.

Parameters

statements: Array<{ sql: string; args: InValue[]; }>

Return Type

Promise<ResultSet[]>

Usage

import { queryBatch } from "docs/database.ts";