Skip to content

@142vip.nest typeorm.类.LegacyOracleNamingStrategy

mmdapl edited this page Oct 8, 2026 · 1 revision

API 参考 / @142vip/nest-typeorm / LegacyOracleNamingStrategy

类: LegacyOracleNamingStrategy

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.d.ts:13

Naming strategy for legacy Oracle database with 30 bytes identifier limit.

Currently, only column name must be shorten in order to avoid ORA-00972. Issues with other identifiers were fixed.

theme_extends

实现

构造函数

构造函数

new LegacyOracleNamingStrategy(shortenStrategy?): LegacyOracleNamingStrategy

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.d.ts:17

参数

shortenStrategy?

ShortenStrategy

返回

LegacyOracleNamingStrategy

重写了

DefaultNamingStrategy.constructor

属性

DEFAULT_COLUMN_PREFIX

readonly DEFAULT_COLUMN_PREFIX: "COL_" = "COL_"

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.d.ts:15


IDENTIFIER_MAX_SIZE

readonly IDENTIFIER_MAX_SIZE: 30 = 30

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.d.ts:14


materializedPathColumnName

materializedPathColumnName: string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:47

Column name for materialized paths.

实现了

NamingStrategyInterface.materializedPathColumnName

继承自

DefaultNamingStrategy.materializedPathColumnName


nestedSetColumnNames

nestedSetColumnNames: object

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:43

Column names for nested sets.

left

left: string

right

right: string

实现了

NamingStrategyInterface.nestedSetColumnNames

继承自

DefaultNamingStrategy.nestedSetColumnNames


shortenStrategy

protected shortenStrategy: ShortenStrategy

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.d.ts:16

方法

checkConstraintName()

checkConstraintName(tableOrName, expression, isEnum?): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:29

Gets the name of the check constraint.

"isEnum" parameter is used to indicate if this check constraint used to handle "simple-enum" type for databases that are not supporting "enum" type out of the box. If "true", constraint is ignored during CHECK constraints synchronization.

参数

tableOrName

string | Table

expression

string

isEnum?

boolean

返回

string

实现了

NamingStrategyInterface.checkConstraintName

继承自

DefaultNamingStrategy.checkConstraintName


closureJunctionTableName()

closureJunctionTableName(originalClosureTableName): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:20

Creates a table name for a junction table of a closure table.

参数

originalClosureTableName

string

Name of the closure table which owns this junction table.

返回

string

实现了

NamingStrategyInterface.closureJunctionTableName

继承自

DefaultNamingStrategy.closureJunctionTableName


columnName()

columnName(propertyName, customName, embeddedPrefixes): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.d.ts:18

Gets the table's column name from the given property name.

参数

propertyName

string

customName

string

embeddedPrefixes

string[]

返回

string

实现了

NamingStrategyInterface.columnName

重写了

DefaultNamingStrategy.columnName


defaultConstraintName()

defaultConstraintName(tableOrName, columnName): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:26

Gets the table's default constraint name from the given table name and column name.

参数

tableOrName

string | Table

columnName

string

返回

string

实现了

NamingStrategyInterface.defaultConstraintName

继承自

DefaultNamingStrategy.defaultConstraintName


exclusionConstraintName()

exclusionConstraintName(tableOrName, expression): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:30

Gets the name of the exclusion constraint.

参数

tableOrName

string | Table

expression

string

返回

string

实现了

NamingStrategyInterface.exclusionConstraintName

继承自

DefaultNamingStrategy.exclusionConstraintName


foreignKeyName()

foreignKeyName(tableOrName, columnNames, _referencedTablePath?, _referencedColumnNames?): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:27

Gets the name of the foreign key.

参数

tableOrName

string | Table

columnNames

string[]

_referencedTablePath?

string

_referencedColumnNames?

string[]

返回

string

实现了

NamingStrategyInterface.foreignKeyName

继承自

DefaultNamingStrategy.foreignKeyName


getTableName()

protected getTableName(tableOrName): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:7

参数

tableOrName

string | Table

返回

string

继承自

DefaultNamingStrategy.getTableName


hashIdentifier()

protected hashIdentifier(input, prefix): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.d.ts:19

参数

input

string

prefix

string

返回

string


indexName()

indexName(tableOrName, columnNames, where?): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:28

Gets the name of the index - simple and compose index.

参数

tableOrName

string | Table

columnNames

string[]

where?

string

返回

string

实现了

NamingStrategyInterface.indexName

继承自

DefaultNamingStrategy.indexName


joinColumnName()

joinColumnName(relationName, referencedColumnName): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:31

Gets the name of the join column used in the one-to-one and many-to-one relations.

参数

relationName

string

referencedColumnName

string

返回

string

实现了

NamingStrategyInterface.joinColumnName

继承自

DefaultNamingStrategy.joinColumnName


joinTableColumnDuplicationPrefix()

joinTableColumnDuplicationPrefix(columnName, index): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:33

Columns in join tables can have duplicate names in case of self-referencing. This method provide a resolution for such column names.

参数

columnName

string

index

number

返回

string

实现了

NamingStrategyInterface.joinTableColumnDuplicationPrefix

继承自

DefaultNamingStrategy.joinTableColumnDuplicationPrefix


joinTableColumnName()

joinTableColumnName(tableName, propertyName, columnName?): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:34

Gets the name of the column used for columns in the junction tables.

The reverse?:boolean parameter denotes if the joinTableColumnName is called for the junctionColumn (false) or the inverseJunctionColumns (true)

参数

tableName

string

propertyName

string

columnName?

string

返回

string

实现了

NamingStrategyInterface.joinTableColumnName

继承自

DefaultNamingStrategy.joinTableColumnName


joinTableInverseColumnName()

joinTableInverseColumnName(tableName, propertyName, columnName?): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:35

Gets the name of the column used for columns in the junction tables from the invers side of the relationship.

参数

tableName

string

propertyName

string

columnName?

string

返回

string

实现了

NamingStrategyInterface.joinTableInverseColumnName

继承自

DefaultNamingStrategy.joinTableInverseColumnName


joinTableName()

joinTableName(firstTableName, secondTableName, firstPropertyName, secondPropertyName): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:32

Gets the name of the join table used in the many-to-many relations.

参数

firstTableName

string

secondTableName

string

firstPropertyName

string

secondPropertyName

string

返回

string

实现了

NamingStrategyInterface.joinTableName

继承自

DefaultNamingStrategy.joinTableName


prefixTableName()

prefixTableName(prefix, tableName): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:42

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.

参数

prefix

string

tableName

string

返回

string

实现了

NamingStrategyInterface.prefixTableName

继承自

DefaultNamingStrategy.prefixTableName


primaryKeyName()

primaryKeyName(tableOrName, columnNames): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:23

Gets the table's primary key name from the given table name and column names.

参数

tableOrName

string | Table

columnNames

string[]

返回

string

实现了

NamingStrategyInterface.primaryKeyName

继承自

DefaultNamingStrategy.primaryKeyName


relationConstraintName()

relationConstraintName(tableOrName, columnNames, where?): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:25

Gets the relation constraint (UNIQUE or UNIQUE INDEX) name from the given table name, column names and WHERE condition, if UNIQUE INDEX used.

参数

tableOrName

string | Table

columnNames

string[]

where?

string

返回

string

实现了

NamingStrategyInterface.relationConstraintName

继承自

DefaultNamingStrategy.relationConstraintName


relationName()

relationName(propertyName): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:22

Gets the table's relation name from the given property name.

参数

propertyName

string

返回

string

实现了

NamingStrategyInterface.relationName

继承自

DefaultNamingStrategy.relationName


tableName()

tableName(targetName, userSpecifiedName): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:14

Normalizes table name.

参数

targetName

string

Name of the target entity that can be used to generate a table name.

userSpecifiedName

string | undefined

For example if user specified a table name in a decorator, e.g. @Entity("name")

返回

string

实现了

NamingStrategyInterface.tableName

继承自

DefaultNamingStrategy.tableName


truncateIdentifier()

protected truncateIdentifier(input): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.d.ts:20

参数

input

string

返回

string


uniqueConstraintName()

uniqueConstraintName(tableOrName, columnNames): string

定义于: node_modules/.pnpm/typeorm@0.3.30_ioredis@5.6.0_mongodb@6.19.0_mssql@11.0.1_mysql2@3.15.1_pg@8.11.3_ts-node@10.9_6zvdq3z7xgsf663jy3j6oymho4/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.d.ts:24

Gets the table's unique constraint name from the given table name and column names.

参数

tableOrName

string | Table

columnNames

string[]

返回

string

实现了

NamingStrategyInterface.uniqueConstraintName

继承自

DefaultNamingStrategy.uniqueConstraintName

Clone this wiki locally