drizzle-orm
Version:
Drizzle ORM package for SQL databases
34 lines (33 loc) • 1.86 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 { SQLiteDialectConfig } from "../dialect.cjs";
import { SQLiteDialect } from "../dialect.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;
private dialectConfig;
constructor(dialect?: SQLiteDialect | SQLiteDialectConfig);
$with<TAlias extends string>(alias: TAlias): {
as<TSelection extends ColumnsSelection>(qb: TypedQueryBuilder<TSelection> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection>)): 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 extends SelectedFields>(fields: TSelection): SQLiteSelectBuilder<TSelection, "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;
}