-
Notifications
You must be signed in to change notification settings - Fork 693
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deprecate: Raise deprecation level of currentScheme property (#1874)
* deprecate: Raise deprecation level of currentScheme property Raise deprecation level of ExposedDatabaseMetadata.currentScheme from WARNING to ERROR. This property was initially deprecated after PR 815 introduced the possibility to change the schema in runtime. The goal of this fix is to keep the property private in JdbcDatabaseMetadataImpl, but it has been used in VendorDialect` and 1 unit test. A new abstract fun tableNamesByCurrentSchema() is introduced to abstract away the schema from the core module. Ideally this function would return a List<String> but tableExists() needs to know about the current scheme name. So, instead, a new data class SchemaMetadata is introduced to store both the schema name and its list of table names.
- Loading branch information
Showing
8 changed files
with
91 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/SchemaMetadata.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.jetbrains.exposed.sql.vendors | ||
|
||
/** | ||
* Represents metadata information about the current schema and its associated tables. | ||
*/ | ||
data class SchemaMetadata( | ||
/** Name of the current schema. */ | ||
val schemaName: String, | ||
/** Names of the existing tables in the current schema. */ | ||
val tableNames: List<String> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters