• For queries with an IN condition, determine if the WHERE clause will exceed SOQL's 4000 character limit. Perform multiple queries as needed to stay below the limit.

    Type Parameters

    • T extends Record<string, unknown> = Record<string, unknown>

    Parameters

    • query: string

      The full query to execute containing the replaceToken param in its IN clause

    • items: string[]

      The IN clause items. A length-appropriate single-quoted comma-separated string chunk will be made from the items.

    • replaceToken: string

      A placeholder in the query's IN condition that will be replaced with the chunked items

    • connection: Connection<Schema>

      For tooling query

    Returns Promise<T[]>

    concatenated array of records returned from the resulting query(ies)