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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import { ColumnMetadata } from "./ColumnMetadata";
import { RelationMetadata } from "./RelationMetadata";
import { EntityMetadata } from "./EntityMetadata";
import { EmbeddedMetadataArgs } from "../metadata-args/EmbeddedMetadataArgs";
import { RelationIdMetadata } from "./RelationIdMetadata";
import { RelationCountMetadata } from "./RelationCountMetadata";
import { Connection } from "../connection/Connection";
import { EntityListenerMetadata } from "./EntityListenerMetadata";
import { IndexMetadata } from "./IndexMetadata";
import { UniqueMetadata } from "./UniqueMetadata";
/**
 * Contains all information about entity's embedded property.
 */
export declare class EmbeddedMetadata {
    /**
     * Entity metadata where this embedded is.
     */
    entityMetadata: EntityMetadata;
    /**
     * Parent embedded in the case if this embedded inside other embedded.
     */
    parentEmbeddedMetadata?: EmbeddedMetadata;
    /**
     * Embedded target type.
     */
    type: Function;
    /**
     * Property name on which this embedded is attached.
     */
    propertyName: string;
    /**
     * Gets full path to this embedded property (including embedded property name).
     * Full path is relevant when embedded is used inside other embeds (one or multiple nested).
     * For example it will return "counters.subcounters".
     */
    propertyPath: string;
    /**
     * Columns inside this embed.
     */
    columns: ColumnMetadata[];
    /**
     * Relations inside this embed.
     */
    relations: RelationMetadata[];
    /**
     * Entity listeners inside this embed.
     */
    listeners: EntityListenerMetadata[];
    /**
     * Indices applied to the embed columns.
     */
    indices: IndexMetadata[];
    /**
     * Uniques applied to the embed columns.
     */
    uniques: UniqueMetadata[];
    /**
     * Relation ids inside this embed.
     */
    relationIds: RelationIdMetadata[];
    /**
     * Relation counts inside this embed.
     */
    relationCounts: RelationCountMetadata[];
    /**
     * Nested embeddable in this embeddable (which has current embedded as parent embedded).
     */
    embeddeds: EmbeddedMetadata[];
    /**
     * Indicates if this embedded is in array mode.
     *
     * This option works only in mongodb.
     */
    isArray: boolean;
    /**
     * Prefix of the embedded, used instead of propertyName.
     * If set to empty string or false, then prefix is not set at all.
     */
    customPrefix: string | boolean | undefined;
    /**
     * Gets the prefix of the columns.
     * By default its a property name of the class where this prefix is.
     * But if custom prefix is set then it takes its value as a prefix.
     * However if custom prefix is set to empty string or false, then prefix to column is not applied at all.
     */
    prefix: string;
    /**
     * Returns array of property names of current embed and all its parent embeds.
     *
     * example: post[data][information][counters].id where "data", "information" and "counters" are embeds
     * we need to get value of "id" column from the post real entity object.
     * this method will return ["data", "information", "counters"]
     */
    parentPropertyNames: string[];
    /**
     * Returns array of prefixes of current embed and all its parent embeds.
     */
    parentPrefixes: string[];
    /**
     * Returns embed metadatas from all levels of the parent tree.
     *
     * example: post[data][information][counters].id where "data", "information" and "counters" are embeds
     * this method will return [embed metadata of data, embed metadata of information, embed metadata of counters]
     */
    embeddedMetadataTree: EmbeddedMetadata[];
    /**
     * Embed metadatas from all levels of the parent tree.
     *
     * example: post[data][information][counters].id where "data", "information" and "counters" are embeds
     * this method will return [embed metadata of data, embed metadata of information, embed metadata of counters]
     */
    columnsFromTree: ColumnMetadata[];
    /**
     * Relations of this embed and all relations from its child embeds.
     */
    relationsFromTree: RelationMetadata[];
    /**
     * Relations of this embed and all relations from its child embeds.
     */
    listenersFromTree: EntityListenerMetadata[];
    /**
     * Indices of this embed and all indices from its child embeds.
     */
    indicesFromTree: IndexMetadata[];
    /**
     * Uniques of this embed and all uniques from its child embeds.
     */
    uniquesFromTree: UniqueMetadata[];
    /**
     * Relation ids of this embed and all relation ids from its child embeds.
     */
    relationIdsFromTree: RelationIdMetadata[];
    /**
     * Relation counts of this embed and all relation counts from its child embeds.
     */
    relationCountsFromTree: RelationCountMetadata[];
    constructor(options: {
        entityMetadata: EntityMetadata;
        args: EmbeddedMetadataArgs;
    });
    /**
     * Creates a new embedded object.
     */
    create(): any;
    build(connection: Connection): this;
    protected buildPartialPrefix(): string[];
    protected buildPrefix(connection: Connection): string;
    protected buildParentPropertyNames(): string[];
    protected buildParentPrefixes(): string[];
    protected buildEmbeddedMetadataTree(): EmbeddedMetadata[];
    protected buildColumnsFromTree(): ColumnMetadata[];
    protected buildRelationsFromTree(): RelationMetadata[];
    protected buildListenersFromTree(): EntityListenerMetadata[];
    protected buildIndicesFromTree(): IndexMetadata[];
    protected buildUniquesFromTree(): UniqueMetadata[];
    protected buildRelationIdsFromTree(): RelationIdMetadata[];
    protected buildRelationCountsFromTree(): RelationCountMetadata[];
}