import { SqlInterfaceInstance, Request as NativeRequest, LoadRequestMeta, Sql4SqlResponse, QueryConvertResponse, SqlFilterItem, SqlFiltersResponse } from '@cubejs-backend/native'; import type { ShutdownMode, SqlResponseStream } from '@cubejs-backend/native'; import { CacheMode } from '@cubejs-backend/shared'; import type { ApiGateway } from './gateway'; import type { CheckSQLAuthFn, ExtendedRequestContext, CanSwitchSQLUserFn } from './interfaces'; export type SQLServerOptions = { checkSqlAuth?: CheckSQLAuthFn; canSwitchSqlUser?: CanSwitchSQLUserFn; sqlPort?: number; pgSqlPort?: number; sqlUser?: string; sqlSuperUser?: string; sqlPassword?: string; gatewayPort?: number; }; export type SQLServerConstructorOptions = { gatewayPort?: number; /** Resolved by the gateway, so the native logger matches the Node one */ devServer?: boolean; }; export type SqlAuthServiceAuthenticateRequest = { protocol: string; method: string; }; export declare class SQLServer { protected readonly apiGateway: ApiGateway; protected sqlInterfaceInstance: SqlInterfaceInstance | null; protected readonly gatewayPort: number | undefined; protected readonly devServer: boolean; constructor(apiGateway: ApiGateway, options: SQLServerConstructorOptions); getNativeGatewayPort(): number; private getSqlInterfaceInstance; execSql(sqlQuery: string, stream: SqlResponseStream, securityContext?: any, cacheMode?: CacheMode, timezone?: string, throwContinueWait?: boolean, requestId?: string): Promise; sql4sql(sqlQuery: string, disablePostProcessing: boolean, securityContext?: unknown): Promise; rest4sql(sqlQuery: string, securityContext?: unknown): Promise; getSqlFilters(sqlQuery: string, securityContext?: unknown): Promise; addSqlFilters(sqlQuery: string, filters: SqlFilterItem[], securityContext?: unknown): Promise; setSqlFilters(sqlQuery: string, filters: SqlFilterItem[], securityContext?: unknown): Promise; deleteSqlFilters(sqlQuery: string, filters: SqlFilterItem[], securityContext?: unknown): Promise; replaceSqlFilters(sqlQuery: string, oldFilters: SqlFilterItem[], newFilters: SqlFilterItem[], securityContext?: unknown): Promise; protected buildCheckSqlAuth(options: SQLServerOptions): CheckSQLAuthFn; init(options: SQLServerOptions): Promise; protected wrapCheckSqlAuthFn(checkSqlAuth: CheckSQLAuthFn): CheckSQLAuthFn; protected createDefaultCanSwitchSqlUserFn(options: SQLServerOptions): CanSwitchSQLUserFn; protected createDefaultCheckSqlAuthFn(options: SQLServerOptions): CheckSQLAuthFn; protected contextByNativeReq(req: NativeRequest, securityContext: any, requestId: string): Promise; close(): Promise; shutdown(mode: ShutdownMode): Promise; } //# sourceMappingURL=sql-server.d.ts.map