Migrate to Exposed 1.0.0 following breaking package restructuring and API changes #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR migrates the exposed module to be compatible with Exposed 1.0.0-rc-1, addressing the major breaking changes introduced in the 1.0.0 release.
🔍 Key Discovery: Complete Package Restructuring
The most critical change in Exposed 1.0.0-rc-1 is a complete package restructuring that breaks all existing imports:
🔧 Major Changes Implemented
Package Structure Migration
org.jetbrains.exposed.sql.*
toorg.jetbrains.exposed.v1.core.*
org.jetbrains.exposed.v1.core.statements.*
API Compatibility Updates
Query
withAbstractQuery
in function return types (Query class removed)it.autoIncColumnType?.nextValExpression != null
to simplified approachDeleteStatement
andUpdateStatement
classesDeprecated API Removal
SqlExpressionBuilder
object, replacing with direct function callsselect()
,selectAll()
, andslice()
extension methods were removed in 1.0.0Compatibility Layer
To maintain backward compatibility while guiding users to new patterns:
🧪 Testing Approach
The migration was validated by:
While this maintains API compatibility at the kotlin-common level, users of the underlying Exposed functionality should be aware:
DebugUpdateBuilderWrapper
is no longer functional (deprecated with ERROR level)selectEmpty()
andemptySlice()
throw exceptions (they caused IllegalArgumentException in 1.0.0)This migration ensures kotlin-common compiles successfully with Exposed 1.0.0-rc-1 while providing clear guidance for any deprecated functionality.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.