Type Parameters

Hierarchy (View Summary)

Constructors

Properties

fromAlias: QueryAlias
fromRow: RowLike | Scalar
joinAliases: { [key: string]: QueryAlias }
query: Q
rawFromExpr: Expression

Methods

  • Returns Setof<Q>

  • Type Parameters

    • G extends Any<unknown, 0 | 1>[]

    Parameters

    • fn: (from: Q["from"]) => G

    Returns Setof<
        Q & {
            groupBy: [
                ...(Q["groupBy"] extends unknown[] ? any[any] : [])[],
                ...G[],
            ];
        },
    >

  • Type Parameters

    • J extends Query
    • A extends string

    Parameters

    • j: Setof<J>
    • as: A
    • on: (
          from: Q["from"],
          js: JoinTables<Q> & { [a in string]: ResultType<J> },
      ) => boolean | Bool<0 | 1>

    Returns Setof<
        Q & {
            joins: Q["joins"] & {
                [a in string]: { on: Bool<0 | 1>; row: RowLike; table: Setof<J> }
            };
        },
    >

  • Returns JoinTables<Q>

  • Returns RawBuilder<unknown>

  • Parameters

    Returns Setof<
        Q & {
            wheres: | [Bool<0 | 1>, ...Bool<0 | 1>[], Bool<0 | 1> | Bool<1>]
            | [Bool<0 | 1> | Bool<1>];
        },
    >

  • Type Parameters

    Parameters

    • fromRow: R

    Returns typeof __class

  • Parameters

    • fromRow: { [key: string]: typeof Any }

    Returns typeof __class