333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { RelationIdMetadataArgs } from "../metadata-args/RelationIdMetadataArgs";
import { EntityMetadata } from "./EntityMetadata";
import { RelationMetadata } from "./RelationMetadata";
import { SelectQueryBuilder } from "../query-builder/SelectQueryBuilder";
import { ObjectLiteral } from "../common/ObjectLiteral";
/**
 * Contains all information about entity's relation count.
 */
export declare class RelationIdMetadata {
    /**
     * Entity metadata where this column metadata is.
     */
    entityMetadata: EntityMetadata;
    /**
     * Relation from which ids will be extracted.
     */
    relation: RelationMetadata;
    /**
     * Relation name which need to count.
     */
    relationNameOrFactory: string | ((object: any) => any);
    /**
     * Target class to which metadata is applied.
     */
    target: Function | string;
    /**
     * Target's property name to which this metadata is applied.
     */
    propertyName: string;
    /**
     * Alias of the joined (destination) table.
     */
    alias?: string;
    /**
     * Extra condition applied to "ON" section of join.
     */
    queryBuilderFactory?: (qb: SelectQueryBuilder<any>) => SelectQueryBuilder<any>;
    constructor(options: {
        entityMetadata: EntityMetadata;
        args: RelationIdMetadataArgs;
    });
    /**
     * Sets relation id value from the given entity.
     *
     * todo: make it to work in embeds as well.
     */
    setValue(entity: ObjectLiteral): void;
    /**
     * Builds some depend relation id properties.
     * This builder method should be used only after entity metadata, its properties map and all relations are build.
     */
    build(): void;
}