azure-kusto-data
Version:
Azure Data Explorer Query SDK
47 lines • 2.33 kB
TypeScript
import { AxiosInstance } from "axios";
import ClientRequestProperties from "./clientRequestProperties.js";
import ConnectionStringBuilder from "./connectionBuilder.js";
import { KustoResponseDataSet } from "./response.js";
import AadHelper from "./security.js";
declare enum ExecutionType {
Mgmt = "mgmt",
Query = "query",
Ingest = "ingest",
QueryV1 = "queryv1"
}
export type RequestEntity = {
query: string;
} | {
stream: any;
} | {
blob: string;
};
export declare class KustoClient {
connectionString: ConnectionStringBuilder;
cluster: string;
defaultDatabase?: string;
endpoints: {
[key in ExecutionType]: string;
};
aadHelper: AadHelper;
axiosInstance: AxiosInstance;
cancelToken: import("axios").CancelTokenSource;
private _isClosed;
constructor(kcsb: string | ConnectionStringBuilder);
execute(db: string | null, query: string, properties?: ClientRequestProperties): Promise<KustoResponseDataSet>;
executeQuery(db: string | null, query: string, properties?: ClientRequestProperties): Promise<KustoResponseDataSet>;
executeQueryV1(db: string | null, query: string, properties?: ClientRequestProperties): Promise<KustoResponseDataSet>;
executeMgmt(db: string | null, query: string, properties?: ClientRequestProperties): Promise<KustoResponseDataSet>;
executeStreamingIngest(db: string | null, table: string, stream: any, streamFormat: any, mappingName: string | null, blob?: string, clientRequestId?: string): Promise<KustoResponseDataSet>;
_execute(endpoint: string, executionType: ExecutionType, db: string | null, entity: RequestEntity, properties?: ClientRequestProperties | null): Promise<KustoResponseDataSet>;
private getDb;
_doRequest(endpoint: string, executionType: ExecutionType, headers: {
[header: string]: string;
}, payload: any, timeout: number, properties?: ClientRequestProperties | null): Promise<KustoResponseDataSet>;
_parseResponse(response: any, executionType: ExecutionType, properties?: ClientRequestProperties | null, status?: number): KustoResponseDataSet;
_getClientTimeout(executionType: ExecutionType, properties?: ClientRequestProperties | null): number;
close(): void;
ensureOpen(): void;
}
export default KustoClient;
//# sourceMappingURL=client.d.ts.map