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
import { NamingStrategyInterface } from "./NamingStrategyInterface";
import { Table } from "../schema-builder/table/Table";
/**
 * Naming strategy that is used by default.
 */
export declare class DefaultNamingStrategy implements NamingStrategyInterface {
    /**
     * Normalizes table name.
     *
     * @param targetName Name of the target entity that can be used to generate a table name.
     * @param userSpecifiedName For example if user specified a table name in a decorator, e.g. @Entity("name")
     */
    tableName(targetName: string, userSpecifiedName: string | undefined): string;
    /**
     * Creates a table name for a junction table of a closure table.
     *
     * @param originalClosureTableName Name of the closure table which owns this junction table.
     */
    closureJunctionTableName(originalClosureTableName: string): string;
    columnName(propertyName: string, customName: string, embeddedPrefixes: string[]): string;
    relationName(propertyName: string): string;
    primaryKeyName(tableOrName: Table | string, columnNames: string[]): string;
    uniqueConstraintName(tableOrName: Table | string, columnNames: string[]): string;
    relationConstraintName(tableOrName: Table | string, columnNames: string[], where?: string): string;
    defaultConstraintName(tableOrName: Table | string, columnName: string): string;
    foreignKeyName(tableOrName: Table | string, columnNames: string[]): string;
    indexName(tableOrName: Table | string, columnNames: string[], where?: string): string;
    checkConstraintName(tableOrName: Table | string, expression: string): string;
    exclusionConstraintName(tableOrName: Table | string, expression: string): string;
    joinColumnName(relationName: string, referencedColumnName: string): string;
    joinTableName(firstTableName: string, secondTableName: string, firstPropertyName: string, secondPropertyName: string): string;
    joinTableColumnDuplicationPrefix(columnName: string, index: number): string;
    joinTableColumnName(tableName: string, propertyName: string, columnName?: string): string;
    joinTableInverseColumnName(tableName: string, propertyName: string, columnName?: string): string;
    /**
     * Adds globally set prefix to the table name.
     * This method is executed no matter if prefix was set or not.
     * Table name is either user's given table name, either name generated from entity target.
     * Note that table name comes here already normalized by #tableName method.
     */
    prefixTableName(prefix: string, tableName: string): string;
}