1 | import { EntityMetadata } from "../metadata/EntityMetadata";
|
2 | import { Connection } from "../connection/Connection";
|
3 | import { RelationMetadata } from "../metadata/RelationMetadata";
|
4 | import { QueryExpressionMap } from "./QueryExpressionMap";
|
5 | import { Alias } from "./Alias";
|
6 |
|
7 |
|
8 |
|
9 | export declare class JoinAttribute {
|
10 | private connection;
|
11 | private queryExpressionMap;
|
12 | |
13 |
|
14 |
|
15 | direction: "LEFT" | "INNER";
|
16 | |
17 |
|
18 |
|
19 | alias: Alias;
|
20 | |
21 |
|
22 |
|
23 | entityOrProperty: Function | string;
|
24 | |
25 |
|
26 |
|
27 | condition?: string;
|
28 | |
29 |
|
30 |
|
31 | mapToProperty?: string;
|
32 | |
33 |
|
34 |
|
35 | isMappingMany?: boolean;
|
36 | constructor(connection: Connection, queryExpressionMap: QueryExpressionMap, joinAttribute?: JoinAttribute);
|
37 | readonly isMany: boolean;
|
38 | isSelectedCache: boolean;
|
39 | isSelectedEvalueated: boolean;
|
40 | /**
|
41 | * Indicates if this join is selected.
|
42 | */
|
43 | readonly isSelected: boolean;
|
44 | /**
|
45 | * Name of the table which we should join.
|
46 | */
|
47 | readonly tablePath: string;
|
48 | /**
|
49 | * Alias of the parent of this join.
|
50 | * For example, if we join ("post.category", "categoryAlias") then "post" is a parent alias.
|
51 | * This value is extracted from entityOrProperty value.
|
52 | * This is available when join was made using "post.category" syntax.
|
53 | */
|
54 | readonly parentAlias: string | undefined;
|
55 | /**
|
56 | * Relation property name of the parent.
|
57 | * This is used to understand what is joined.
|
58 | * For example, if we join ("post.category", "categoryAlias") then "category" is a relation property.
|
59 | * This value is extracted from entityOrProperty value.
|
60 | * This is available when join was made using "post.category" syntax.
|
61 | */
|
62 | readonly relationPropertyPath: string | undefined;
|
63 | relationCache: RelationMetadata | undefined;
|
64 | relationEvalueated: boolean;
|
65 | /**
|
66 | * Relation of the parent.
|
67 | * This is used to understand what is joined.
|
68 | * This is available when join was made using "post.category" syntax.
|
69 | * Relation can be undefined if entityOrProperty is regular entity or custom table.
|
70 | */
|
71 | readonly relation: RelationMetadata | undefined;
|
72 | /**
|
73 | * Metadata of the joined entity.
|
74 | * If table without entity was joined, then it will return undefined.
|
75 | */
|
76 | readonly metadata: EntityMetadata | undefined;
|
77 | /**
|
78 | * Generates alias of junction table, whose ids we get.
|
79 | */
|
80 | readonly junctionAlias: string;
|
81 | readonly mapToPropertyParentAlias: string | undefined;
|
82 | readonly mapToPropertyPropertyName: string | undefined;
|
83 | }
|