/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import { DbRequestKind } from "@itwin/core-common";
/** @internal */
export class ConcurrentQuery {
    /** @internal */
    static async executeQueryRequest(conn, request) {
        return new Promise((resolve) => {
            request.kind = DbRequestKind.ECSql;
            conn.concurrentQueryExecute(request, (response) => {
                resolve(response);
            });
        });
    }
    /** @internal */
    static async executeBlobRequest(conn, request) {
        return new Promise((resolve) => {
            request.kind = DbRequestKind.BlobIO;
            conn.concurrentQueryExecute(request, (response) => {
                resolve(response);
            });
        });
    }
    static resetConfig(conn, config) {
        return conn.concurrentQueryResetConfig(config);
    }
    static shutdown(conn) {
        conn.concurrentQueryShutdown();
    }
}
//# sourceMappingURL=ConcurrentQuery.js.map