import { SQL } from "drizzle-orm";
import { AnyTable, AnySelectedFields, SelectQuery, AnyColumn, QuerySource, DbSchema } from "@db/types/db-types";
/** @monorepo-internal */
export declare function initializeDb(schema: DbSchema): void;
export declare function initAppDb(schema: DbSchema): void;
export declare function getDb(): any;
/** @monorepo-internal */
export declare function createDynamicSelect(table: QuerySource, selection?: AnySelectedFields): any;
export declare function getQueryConfig(query: SelectQuery): any;
/** @monorepo-internal */
export declare function dbLike(column: AnyColumn | SQL, value: string | SQL): any;
/** @monorepo-internal */
export declare function dbExtractDate(column: AnyColumn | SQL): any;
/** @monorepo-internal */
export declare function dbLeftJoin(query: SelectQuery, table: QuerySource, condition: SQL): any;
/** @monorepo-internal */
export declare function dbInnerJoin(query: SelectQuery, table: QuerySource, condition: SQL): any;
/** @monorepo-internal */
export declare function dbOrderBy(query: SelectQuery, ...columns: (SQL | AnyColumn)[]): any;
/** @monorepo-internal */
export declare function dbGroupBy(query: SelectQuery, ...columns: (SQL | AnyColumn)[]): any;
/** @monorepo-internal */
export declare function dbHaving(query: SelectQuery, condition: SQL): any;
/** @monorepo-internal */
export declare function dbLimit(query: SelectQuery, value: number): any;
/** @monorepo-internal */
export declare function dbOffset(query: SelectQuery, value: number): any;
/** @monorepo-internal */
export declare function dbWhere(query: SelectQuery, condition?: SQL): any;
/** @monorepo-internal */
export declare function dbInsert(table: AnyTable): any;
/** @monorepo-internal */
export declare function dbUpdate(table: AnyTable): any;
/** @monorepo-internal */
export declare function dbDelete(table: AnyTable): any;
/** @monorepo-internal */
export declare function createDb(): Promise<void>;
/** @monorepo-internal */
export declare function dropDb(): Promise<void>;
/** @monorepo-internal */
export declare function emptyAllTables(): Promise<void>;
/** @monorepo-internal */
export declare function migrate(): Promise<void>;
/** @monorepo-internal */
export declare function generateMigrations(name: string): Promise<void>;
/** @internal */
export declare function beginUnsafeTransactionOnlyForTest(): Promise<void>;
/** @internal */
export declare function rollbackUnsafeTransactionOnlyForTest(): Promise<void>;
