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

    Function queryAll

    • Reads every matching row, taking the routing key from the statement.

      Type Parameters

      • T = Record<string, unknown>

        Type of the result records

      Parameters

      • sql: string

        Statement text using ? placeholders

      • bindings: any[] = []

        Positional bindings for the statement

      Returns Promise<QueryResult<T>>

      Rows from every shard the statement routes to

      If the routing key cannot be determined and onUnroutable is throw

      1.4.0

      const { results } = await queryAll<User>('SELECT * FROM users WHERE id IN (?, ?)', ['user-1', 'user-2']);