From 3ea90374f31b76600ef185fe9a4c9b20ce3a1c5b Mon Sep 17 00:00:00 2001 From: Jocelyne Date: Wed, 11 Oct 2023 10:46:32 +0200 Subject: [PATCH] chore: add KDoc for tableNameWithoutSchemeSanitized --- .../src/main/kotlin/org/jetbrains/exposed/sql/Table.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/Table.kt b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/Table.kt index 1531bf45d4..511979d267 100644 --- a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/Table.kt +++ b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/Table.kt @@ -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("\"", "")