1 | import { ColumnMetadata } from "./ColumnMetadata";
|
2 | import { EntityMetadata } from "./EntityMetadata";
|
3 | import { NamingStrategyInterface } from "../naming-strategy/NamingStrategyInterface";
|
4 | import { DeferrableType } from "./types/DeferrableType";
|
5 | import { OnDeleteType } from "./types/OnDeleteType";
|
6 | import { OnUpdateType } from "./types/OnUpdateType";
|
7 |
|
8 |
|
9 |
|
10 | export declare class ForeignKeyMetadata {
|
11 | |
12 |
|
13 |
|
14 | entityMetadata: EntityMetadata;
|
15 | |
16 |
|
17 |
|
18 | referencedEntityMetadata: EntityMetadata;
|
19 | |
20 |
|
21 |
|
22 | columns: ColumnMetadata[];
|
23 | |
24 |
|
25 |
|
26 | referencedColumns: ColumnMetadata[];
|
27 | |
28 |
|
29 |
|
30 | onDelete?: OnDeleteType;
|
31 | |
32 |
|
33 |
|
34 | onUpdate?: OnUpdateType;
|
35 | |
36 |
|
37 |
|
38 | deferrable?: DeferrableType;
|
39 | |
40 |
|
41 |
|
42 | referencedTablePath: string;
|
43 | |
44 |
|
45 |
|
46 | name: string;
|
47 | |
48 |
|
49 |
|
50 | columnNames: string[];
|
51 | |
52 |
|
53 |
|
54 | referencedColumnNames: string[];
|
55 | constructor(options: {
|
56 | entityMetadata: EntityMetadata;
|
57 | referencedEntityMetadata: EntityMetadata;
|
58 | namingStrategy?: NamingStrategyInterface;
|
59 | columns: ColumnMetadata[];
|
60 | referencedColumns: ColumnMetadata[];
|
61 | onDelete?: OnDeleteType;
|
62 | onUpdate?: OnUpdateType;
|
63 | deferrable?: DeferrableType;
|
64 | });
|
65 | /**
|
66 | * Builds some depend foreign key properties.
|
67 | * Must be called after all entity metadatas and their columns are built.
|
68 | */
|
69 | build(namingStrategy: NamingStrategyInterface): void;
|
70 | }
|