PgSelectQueryBuilder
abstractabstract class PgSelectQueryBuilder<THKT extends PgSelectHKTBase, TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, "not-null"> : {}> extends QueryBuilder<BuildSubquerySelection<TSelection, TNullabilityMap>> { }
constructor(
table: PgSelectConfig["table"],
fields: PgSelectConfig["fields"],
fieldsList: PgSelectConfig["fieldsList"],
isPartialSelect: boolean,
session: PgSession | undefined,
dialect: PgDialect,
withList: Subquery[],
);private createJoin;
private isPartialSelect;
private tableName;
protected joinsNotNullableMap: Record<string, boolean>;
readonly _: {
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>;
as<TAlias extends string>(alias: TAlias): SubqueryWithSelection<BuildSubquerySelection<TSelection, TNullabilityMap>, TAlias>;
limit(limit: number): this;
offset(offset: number): this;
§Type Parameters
§
THKT extends PgSelectHKTBase
[src]§
TSelectMode extends SelectMode
[src]§
TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, "not-null"> : {}
[src]§Extends
§
QueryBuilder<BuildSubquerySelection<TSelection, TNullabilityMap>>
[src]§Constructors
§
new PgSelectQueryBuilder(table: PgSelectConfig["table"], fields: PgSelectConfig["fields"], fieldsList: PgSelectConfig["fieldsList"], isPartialSelect: boolean, session: PgSession | undefined, dialect: PgDialect, withList: Subquery[])
[src]§Properties
§
config: PgSelectConfig
[src]§
_: {
[src]readonly selectMode: TSelectMode;
readonly selection: TSelection;
readonly selectedFields: BuildSubquerySelection<TSelection, TNullabilityMap>;
}§Methods
§
as<TAlias extends string>(alias: TAlias): SubqueryWithSelection<BuildSubquerySelection<TSelection, TNullabilityMap>, TAlias>
[src]§
groupBy(builder: (aliases: TSelection) => ValueOrArray<AnyPgColumn | SQL | SQL.Aliased>): this
[src]groupBy(...columns: (AnyPgColumn | SQL | SQL.Aliased)[]): this
[src]§
orderBy(builder: (aliases: TSelection) => ValueOrArray<AnyPgColumn | SQL | SQL.Aliased>): this
[src]orderBy(...columns: (AnyPgColumn | SQL | SQL.Aliased)[]): this
[src]