Skip to main content
Version: 5.2

IQueryBuilder <T>

Type parameters

  • T

Index

Properties

optional_fields

_fields?: Field<T>[]

readonlyalias

alias: string

readonlytype

type: QueryType

Methods

addSelect

andWhere

count

  • count(field?: string | string[], distinct?: boolean): IQueryBuilder<T>
  • Parameters

    • optionalfield: string | string[]
    • optionaldistinct: boolean

    Returns IQueryBuilder<T>

delete

getAliasForJoinPath

  • getAliasForJoinPath(path: string): undefined | string
  • Parameters

    • path: string

    Returns undefined | string

getNextAlias

  • getNextAlias(entityName?: string): string
  • Parameters

    • optionalentityName: string

    Returns string

groupBy

  • groupBy(fields: string | keyof T | (string | keyof T)[]): IQueryBuilder<T>
  • Parameters

    • fields: string | keyof T | (string | keyof T)[]

    Returns IQueryBuilder<T>

having

  • Parameters

    • optionalcond: any
    • optionalparams: any[]

    Returns IQueryBuilder<T>

insert

join

  • join(field: string, alias: string, cond?: any, type?: innerJoin | leftJoin | pivotJoin, path?: string): IQueryBuilder<T>
  • Parameters

    • field: string
    • alias: string
    • optionalcond: any
    • optionaltype: innerJoin | leftJoin | pivotJoin
    • optionalpath: string

    Returns IQueryBuilder<T>

joinAndSelect

  • joinAndSelect(field: string, alias: string, cond?: any): IQueryBuilder<T>
  • Parameters

    • field: string
    • alias: string
    • optionalcond: any

    Returns IQueryBuilder<T>

leftJoin

  • leftJoin(field: string, alias: string, cond?: any): IQueryBuilder<T>
  • Parameters

    • field: string
    • alias: string
    • optionalcond: any

    Returns IQueryBuilder<T>

leftJoinAndSelect

  • leftJoinAndSelect(field: string, alias: string, cond?: any): IQueryBuilder<T>
  • Parameters

    • field: string
    • alias: string
    • optionalcond: any

    Returns IQueryBuilder<T>

orWhere

orderBy

select

truncate

update

where

withSubQuery

  • withSubQuery(subQuery: QueryBuilder<any, any>, alias: string): IQueryBuilder<T>
  • Parameters

    • subQuery: QueryBuilder<any, any>
    • alias: string

    Returns IQueryBuilder<T>