drizzle-orm
Version:
Drizzle ORM package for SQL databases
30 lines (29 loc) • 1.69 kB
text/typescript
import { entityKind } from "../../entity.cjs";
import type { TypedQueryBuilder } from "../../query-builders/query-builder.cjs";
import type { ColumnsSelection } from "../../sql/sql.cjs";
import type { WithSubqueryWithSelection } from "../subquery.cjs";
import { WithSubquery } from "../../subquery.cjs";
import { SQLiteSelectBuilder } from "./select.cjs";
import type { SelectedFields } from "./select.types.cjs";
export declare class QueryBuilder {
static readonly [entityKind]: string;
private dialect;
$with<TAlias extends string>(alias: TAlias): {
as<TSelection extends ColumnsSelection>(qb: TypedQueryBuilder<TSelection, unknown> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection, unknown>)): WithSubqueryWithSelection<TSelection, TAlias>;
};
with(...queries: WithSubquery[]): {
select: {
(): SQLiteSelectBuilder<undefined, 'sync', void, 'qb'>;
<TSelection extends SelectedFields>(fields: TSelection): SQLiteSelectBuilder<TSelection, "sync", void, "qb">;
};
selectDistinct: {
(): SQLiteSelectBuilder<undefined, 'sync', void, 'qb'>;
<TSelection_1 extends SelectedFields>(fields: TSelection_1): SQLiteSelectBuilder<TSelection_1, "sync", void, "qb">;
};
};
select(): SQLiteSelectBuilder<undefined, 'sync', void, 'qb'>;
select<TSelection extends SelectedFields>(fields: TSelection): SQLiteSelectBuilder<TSelection, 'sync', void, 'qb'>;
selectDistinct(): SQLiteSelectBuilder<undefined, 'sync', void, 'qb'>;
selectDistinct<TSelection extends SelectedFields>(fields: TSelection): SQLiteSelectBuilder<TSelection, 'sync', void, 'qb'>;
private getDialect;
}