Skip to main content
Module

x/typeorm/src/query-builder/JoinAttribute.ts>JoinAttribute

Forked from https://github.com/typeorm/typeorm
Latest
class JoinAttribute
import { JoinAttribute } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/query-builder/JoinAttribute.ts";

Stores all join attributes which will be used to build a JOIN query.

Constructors

new
JoinAttribute(
connection: Connection,
queryExpressionMap: QueryExpressionMap,
joinAttribute?: JoinAttribute,
)

Properties

alias: Alias

Alias of the joined (destination) table.

optional
condition: string

Extra condition applied to "ON" section of join.

direction: "LEFT" | "INNER"

Join direction.

entityOrProperty: Function | string

Joined table, entity target, or relation in "post.category" format.

readonly
isMany: boolean
optional
isMappingMany: boolean

Indicates if user maps one or many objects from the join.

readonly
isSelected: boolean

Indicates if this join is selected.

isSelectedCache: boolean
isSelectedEvaluated: boolean
readonly
junctionAlias: string

Generates alias of junction table, whose ids we get.

optional
mapToProperty: string

Property + alias of the object where to joined data should be mapped.

readonly
mapToPropertyParentAlias: string | undefined
readonly
mapToPropertyPropertyName: string | undefined
readonly
metadata: EntityMetadata | undefined

Metadata of the joined entity. If table without entity was joined, then it will return undefined.

readonly
parentAlias: string | undefined

Alias of the parent of this join. For example, if we join ("post.category", "categoryAlias") then "post" is a parent alias. This value is extracted from entityOrProperty value. This is available when join was made using "post.category" syntax.

readonly
relation: RelationMetadata | undefined

Relation of the parent. This is used to understand what is joined. This is available when join was made using "post.category" syntax. Relation can be undefined if entityOrProperty is regular entity or custom table.

relationCache: RelationMetadata | undefined
relationEvaluated: boolean
readonly
relationPropertyPath: string | undefined

Relation property name of the parent. This is used to understand what is joined. For example, if we join ("post.category", "categoryAlias") then "category" is a relation property. This value is extracted from entityOrProperty value. This is available when join was made using "post.category" syntax.

readonly
tablePath: string

Name of the table which we should join.