1 | import { EmbeddedMetadata } from "./EmbeddedMetadata";
|
2 | import { EntityMetadata } from "./EntityMetadata";
|
3 | import { NamingStrategyInterface } from "../naming-strategy/NamingStrategyInterface";
|
4 | import { ColumnMetadata } from "./ColumnMetadata";
|
5 | import { UniqueMetadataArgs } from "../metadata-args/UniqueMetadataArgs";
|
6 |
|
7 |
|
8 |
|
9 | export declare class UniqueMetadata {
|
10 | |
11 |
|
12 |
|
13 | entityMetadata: EntityMetadata;
|
14 | |
15 |
|
16 |
|
17 | embeddedMetadata?: EmbeddedMetadata;
|
18 | |
19 |
|
20 |
|
21 | target?: Function | string;
|
22 | |
23 |
|
24 |
|
25 | columns: ColumnMetadata[];
|
26 | |
27 |
|
28 |
|
29 | givenName?: string;
|
30 | |
31 |
|
32 |
|
33 | givenColumnNames?: ((object?: any) => (any[] | {
|
34 | [key: string]: number;
|
35 | })) | string[];
|
36 | /**
|
37 | * Final unique constraint name.
|
38 | * If unique constraint name was given by a user then it stores normalized (by naming strategy) givenName.
|
39 | * If unique constraint name was not given then its generated.
|
40 | */
|
41 | name: string;
|
42 | /**
|
43 | * Map of column names with order set.
|
44 | * Used only by MongoDB driver.
|
45 | */
|
46 | columnNamesWithOrderingMap: {
|
47 | [key: string]: number;
|
48 | };
|
49 | constructor(options: {
|
50 | entityMetadata: EntityMetadata;
|
51 | embeddedMetadata?: EmbeddedMetadata;
|
52 | columns?: ColumnMetadata[];
|
53 | args?: UniqueMetadataArgs;
|
54 | });
|
55 | /**
|
56 | * Builds some depend unique constraint properties.
|
57 | * Must be called after all entity metadata's properties map, columns and relations are built.
|
58 | */
|
59 | build(namingStrategy: NamingStrategyInterface): this;
|
60 | }
|
61 |
|
\ | No newline at end of file |