Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JoinDatabaseQuery<T, PARENT>

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

classSchema

classSchema: ClassSchema<T>

foreignClassSchema

foreignClassSchema: ClassSchema

format

format: "class" | "json" | "raw" = "class"

model

model: DatabaseQueryModel<T> = new DatabaseQueryModel<T>()
internal

parentQuery

parentQuery: PARENT

Methods

clone

  • Parameters

    • parentQuery: PARENT

    Returns JoinDatabaseQuery<T, PARENT>

disableInstancePooling

  • disableInstancePooling(): this
  • Instace pooling is used to store all created entity instances in a pool. If a query fetches an already known entity instance, the old will be picked. This ensures object instances uniqueness and generally saves CPU circles.

    This disabled entity tracking, forcing always to create new entity instances.

    Returns this

end

  • end(): PARENT
  • Returns PARENT

filter

  • Parameters

    Returns this

getJoin

innerJoin

  • innerJoin<K>(field: K): this
  • Adds a inner join in the filter. Does NOT populate the reference with values. Accessing field in the entity (if not optional field) results in an error.

    Type parameters

    • K: keyof T

    Parameters

    • field: K

    Returns this

innerJoinWith

  • innerJoinWith<K>(field: K): this
  • Adds a inner join in the filter and populates the result set WITH reference field accordingly.

    Type parameters

    • K: keyof T

    Parameters

    • field: K

    Returns this

join

  • join<K>(field: K, type?: "left" | "inner", populate?: boolean): this
  • Adds a left join in the filter. Does NOT populate the reference with values. Accessing field in the entity (if not optional field) results in an error.

    Type parameters

    • K: keyof T

    Parameters

    • field: K
    • Default value type: "left" | "inner" = "left"
    • Default value populate: boolean = false

    Returns this

joinWith

  • joinWith<K>(field: K): this
  • Adds a left join in the filter and populates the result set WITH reference field accordingly.

    Type parameters

    • K: keyof T

    Parameters

    • field: K

    Returns this

limit

  • limit(value?: undefined | number): this
  • Parameters

    • Optional value: undefined | number

    Returns this

parameter

  • parameter(name: string, value: any): this
  • Parameters

    • name: string
    • value: any

    Returns this

parameters

  • parameters(parameters: {}): this
  • Parameters

    • parameters: {}
      • [name: string]: any

    Returns this

select

  • select(...fields: keyof T[]): this
  • select(fields: string[] | keyof T[]): this
  • Parameters

    • Rest ...fields: keyof T[]

    Returns this

  • Parameters

    • fields: string[] | keyof T[]

    Returns this

skip

  • skip(value?: undefined | number): this
  • Parameters

    • Optional value: undefined | number

    Returns this

sort

  • sort(sort?: SORT<T>): this
  • Parameters

    • Optional sort: SORT<T>

    Returns this

useInnerJoin

  • Adds a inner join in the filter. Does NOT populate the reference with values. Accessing field in the entity (if not optional field) results in an error. Returns JoinDatabaseQuery to further specify the join, which you need to .end()

    Type parameters

    • K: keyof T

    Parameters

    • field: K

    Returns JoinDatabaseQuery<FlattenIfArray<T[K]>, this>

useInnerJoinWith

  • Adds a inner join in the filter and populates the result set WITH reference field accordingly. Returns JoinDatabaseQuery to further specify the join, which you need to .end()

    Type parameters

    • K: keyof T

    Parameters

    • field: K

    Returns JoinDatabaseQuery<FlattenIfArray<T[K]>, this>

useJoin

  • Adds a left join in the filter. Does NOT populate the reference with values. Accessing field in the entity (if not optional field) results in an error. Returns JoinDatabaseQuery to further specify the join, which you need to .end()

    Type parameters

    • K: keyof T

    Parameters

    • field: K

    Returns JoinDatabaseQuery<FlattenIfArray<T[K]>, this>

useJoinWith

  • Adds a left join in the filter and populates the result set WITH reference field accordingly. Returns JoinDatabaseQuery to further specify the join, which you need to .end()

    Type parameters

    • K: keyof T

    Parameters

    • field: K

    Returns JoinDatabaseQuery<FlattenIfArray<T[K]>, this>

Generated using TypeDoc