///
import { Credentials } from "@dataform/api/commands/credentials";
import { IDbAdapter, OnCancel } from "@dataform/api/dbadapters/index";
import { dataform } from "@dataform/protos";
interface IBigQueryTableMetadata {
type: string;
schema: {
fields: IBigQueryFieldMetadata[];
};
tableReference: {
projectId: string;
datasetId: string;
tableId: string;
};
lastModifiedTime: string;
description?: string;
}
interface IBigQueryFieldMetadata {
name: string;
mode: string;
type: string;
fields?: IBigQueryFieldMetadata[];
description?: string;
}
export declare class BigQueryDbAdapter implements IDbAdapter {
static create(credentials: Credentials): Promise;
private bigQueryCredentials;
private pool;
private readonly clients;
private constructor();
execute(statement: string, options?: {
onCancel?: OnCancel;
interactive?: boolean;
maxResults?: number;
}): Promise;
evaluate(statement: string): Promise;
tables(): Promise;
table(target: dataform.ITarget): Promise;
preview(target: dataform.ITarget, limitRows?: number): Promise;
prepareSchema(database: string, schema: string): Promise;
dropSchema(database: string, schema: string): Promise;
close(): Promise;
prepareStateMetadataTable(): Promise;
persistedStateMetadata(): Promise;
persistStateMetadata(actions: dataform.IExecutionAction[]): Promise;
setMetadata(action: dataform.IExecutionAction): Promise;
getMetadata(target: dataform.ITarget): Promise;
deleteStateMetadata(actions: dataform.IExecutionAction[]): Promise;
private getMetadataOutsidePromisePool;
private getClient;
private runQuery;
private createQueryJob;
}
export {};