Naming convention used for constraint names.
Note that these constraint names are trimmed in the PlatformDdl which can be overridden
but provides a decent default implementation.
-
Nested Class Summary
Nested Classes
static interface
Defines how constraint names are shortened if required based on platform limitations.
-
Constructor Summary
Constructors
Construct using default of lower case for both table and column names.
Construct specifying if lower case should be used (for both table and column names).
Construct specifying if lower case should be used for both table and column names.
-
Method Summary
Return the check constraint name.
Return the foreign key constraint name given a single column foreign key.
Return the index name associated with a foreign key constraint given a single column foreign key.
Return the index name associated with a foreign key constraint given multiple columns.
Return the MaxLength implementation used to truncate/shorten db constraint names as necessary.
Return the index name for a general index (not associated with a foreign key).
Return the index name for a general index (not associated with a foreign key).
Normalise the column name by removing any quoted identifier characters (",',[,] etc).
Normalise the table name by trimming catalog and schema and removing any
quoted identifier characters (",',[,] etc).
Return the primary key constraint name.
void
Set the MaxLength implementation used to truncate/shorten db constraint names as necessary.
Return the unique constraint name.
Return the unique constraint name.
-
Constructor Details
-
DbConstraintNaming
Construct using default of lower case for both table and column names.
-
DbConstraintNaming
Construct specifying if lower case should be used (for both table and column names).
-
DbConstraintNaming
Construct specifying if lower case should be used for both table and column names.
-
Method Details
-
getMaxLength
Return the MaxLength implementation used to truncate/shorten db constraint names as necessary.
-
setMaxLength
Set the MaxLength implementation used to truncate/shorten db constraint names as necessary.
-
primaryKeyName
Return the primary key constraint name.
-
foreignKeyConstraintName
Return the foreign key constraint name given a single column foreign key.
-
foreignKeyIndexName
Return the index name associated with a foreign key constraint given multiple columns.
-
foreignKeyIndexName
Return the index name associated with a foreign key constraint given a single column foreign key.
-
indexName
Return the index name for a general index (not associated with a foreign key).
-
indexName
Return the index name for a general index (not associated with a foreign key).
-
uniqueConstraintName
Return the unique constraint name.
-
uniqueConstraintName
Return the unique constraint name.
-
checkConstraintName
Return the check constraint name.
-
normaliseTable
Normalise the table name by trimming catalog and schema and removing any
quoted identifier characters (",',[,] etc).
-
normaliseColumn
Normalise the column name by removing any quoted identifier characters (",',[,] etc).