Skip to content

Commit

Permalink
chore: add KDoc for tableNameWithoutSchemeSanitized
Browse files Browse the repository at this point in the history
  • Loading branch information
joc-a committed Oct 11, 2023
1 parent ed6df73 commit 3ea9037
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,14 @@ open class Table(name: String = "") : ColumnSet(), DdlAware {
internal val tableNameWithoutScheme: String
get() = if (!tableName.isAlreadyQuoted()) tableName.substringAfterLast(".") else tableName

// Table name may contain quotes, remove those before appending
/**
* Returns the table name without schema, with all quotes removed.
*
* Used for two purposes:
* 1. Forming primary and foreign key names
* 2. Comparing table names from database metadata (except MySQL and MariaDB)
* @see org.jetbrains.exposed.sql.vendors.VendorDialect.metadataMatchesTable
*/
internal val tableNameWithoutSchemeSanitized: String
get() = tableNameWithoutScheme
.replace("\"", "")
Expand Down

0 comments on commit 3ea9037

Please sign in to comment.