import type { DatabaseId, TemplateTags } from "../metabase-types/api";
import type { MetadataProvider, Query } from "./types";
export declare function nativeQuery(databaseId: DatabaseId, metadata: MetadataProvider, innerQuery: string): Query;
export declare function rawNativeQuery(query: Query): string;
export declare function withNativeQuery(query: Query, innerQuery: string): Query;
export declare function withTemplateTags(query: Query, tags: TemplateTags): Query;
export declare function templateTags(query: Query): TemplateTags;
export declare function extractTemplateTags(queryText: string, existingTags?: TemplateTags): TemplateTags;
export declare function hasWritePermission(query: Query): boolean;
export declare function withDifferentDatabase(query: Query, databaseId: DatabaseId, metadata: MetadataProvider): Query;
export declare function engine(query: Query): string;
/**
 * Returns the extra keys that are required for this database's native queries, for example `:collection` name is
 *  needed for MongoDB queries.
 */
export declare function requiredNativeExtras(databaseId: DatabaseId, metadata: MetadataProvider): string[];
type NativeExtras = {
    collection?: string | null;
};
/**
 * Returns the extra keys for native queries associated with this query.
 */
export declare function nativeExtras(query: Query): NativeExtras | null;
/**
 * Updates the extras required for the db to run this query. The first stage must be a native type. Will ignore extras
 * not in `required-native-extras`.
 */
export declare function withNativeExtras(query: Query, nativeExtras: NativeExtras | null): Query;
export {};
