import { SQL, Subquery } from "drizzle-orm";
import { AnyTable, SelectQuery, AnySelectedFields, TableWithId } from "@db/types/db-types";
import { WithIndexer } from "../../fd-toolbox-core/types/with-indexer";
/** @monorepo-internal */
export declare function getColumnsFromTable<T extends AnyTable>(table: T): WithIndexer<AnyColumn>;
/** @monorepo-internal */
export declare function getTableColumn(table: AnyTable, property: string): AnyColumn;
/** @monorepo-internal */
export declare function compareTableByName(firstTable: AnyTable | Subquery | SQL, secondTable: AnyTable | Subquery | SQL): boolean;
export declare function ensureTableNameIsValid(name: string): string;
/** @monorepo-internal */
export declare function getTableByName<TTable extends TableWithId>(name: string): TTable;
/** @monorepo-internal */
export declare function applyFilterToQuery(query: SelectQuery, filters?: SQL): void;
/** @monorepo-internal */
export declare function getQueryConfig(query: SelectQuery): any;
export declare function getQueryWithoutGlobalFilters<TSelection extends AnySelectedFields | undefined, TFrom extends AnyTable>(table: TFrom, selects?: TSelection): Promise<{
    query: any;
}>;
/** @monorepo-internal */
export declare function runQuery<T>(query: SelectQuery): Promise<T[]>;
