SnakeNamingStrategy
A TypeORM naming strategy that converts names to snake_case.
Extends
DefaultNamingStrategy
Implements
NamingStrategyInterface
Constructors
new SnakeNamingStrategy()
new SnakeNamingStrategy(): SnakeNamingStrategy
Returns
Inherited from
DefaultNamingStrategy.constructor
Properties
materializedPathColumnName
materializedPathColumnName: string;
Column name for materialized paths.
Implementation of
NamingStrategyInterface.materializedPathColumnName
Inherited from
DefaultNamingStrategy.materializedPathColumnName
nestedSetColumnNames
nestedSetColumnNames: object;
Column names for nested sets.
left
left: string;
right
right: string;
Implementation of
NamingStrategyInterface.nestedSetColumnNames
Inherited from
DefaultNamingStrategy.nestedSetColumnNames
Methods
checkConstraintName()
checkConstraintName(
tableOrName,
expression,
isEnum?): string
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.
Parameters
Parameter | Type |
---|---|
tableOrName | string | Table |
expression | string |
isEnum ? | boolean |
Returns
string
Implementation of
NamingStrategyInterface.checkConstraintName
Inherited from
DefaultNamingStrategy.checkConstraintName
classTableInheritanceParentColumnName()
classTableInheritanceParentColumnName(parentTableName, parentTableIdPropertyName): string
Parameters
Parameter | Type |
---|---|
parentTableName | any |
parentTableIdPropertyName | any |
Returns
string
closureJunctionTableName()
closureJunctionTableName(originalClosureTableName): string
Creates a table name for a junction table of a closure table.