import { PgSelectQueryBuilder } from "https://deno.land/x/drizzle@v0.23.85/pg-core/query-builders.ts";
Constructors
new
PgSelectQueryBuilder(table: PgSelectConfig["table"],
fields: PgSelectConfig["fields"],
fieldsList: PgSelectConfig["fieldsList"],
isPartialSelect: boolean,
session: PgSession | undefined,
dialect: PgDialect,
withList: Subquery[],
Type Parameters
THKT extends PgSelectHKTBase
TSelectMode extends SelectMode
optional
TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, "not-null"> : { }Properties
protected
config: PgSelectConfigprotected
dialect: PgDialectprotected
session: PgSession | undefinedreadonly
_: { readonly selectMode: TSelectMode; readonly selection: TSelection; readonly selectedFields: BuildSubquerySelection<TSelection, TNullabilityMap>; }fullJoin: JoinFn<THKT, TTableName, TSelectMode, "full", TSelection, TNullabilityMap>
innerJoin: JoinFn<THKT, TTableName, TSelectMode, "inner", TSelection, TNullabilityMap>
leftJoin: JoinFn<THKT, TTableName, TSelectMode, "left", TSelection, TNullabilityMap>
rightJoin: JoinFn<THKT, TTableName, TSelectMode, "right", TSelection, TNullabilityMap>
Methods
as<TAlias extends string>(alias: TAlias): SubqueryWithSelection<BuildSubquerySelection<TSelection, TNullabilityMap>, TAlias>
for(strength: LockStrength, config?: LockConfig): this
groupBy(builder: (aliases: TSelection) => ValueOrArray<AnyPgColumn | SQL | SQL.Aliased>): this
groupBy(...columns: (AnyPgColumn | SQL | SQL.Aliased)[]): this
having(having: ((aliases: TSelection) => SQL | undefined) | SQL | undefined): this
limit(limit: number): this
offset(offset: number): this
orderBy(builder: (aliases: TSelection) => ValueOrArray<AnyPgColumn | SQL | SQL.Aliased>): this
orderBy(...columns: (AnyPgColumn | SQL | SQL.Aliased)[]): this
where(where: ((aliases: TSelection) => SQL | undefined) | SQL | undefined): this