Additional db support#108
Conversation
Support for SQLite, integrating it in the Integration Tests and enhance date/time support to handle SQLite storing date/time as strings/Long.
Only start test container when needed.
bugfix: char converter - Update integration tests to support MS SQL Server - Update UUID Converter to support SQL server using JDBC type CHAR - Fix char conversion.
b5f7f27 to
18d99e2
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Oracle, MS SQL Server, and SQLite by extending the DbFlavour enum, updating conversion functions, and adding new integration tests. Key changes include:
- Enhancements to database flavor detection and conversion functions in Converters.kt and DbFlavour.kt.
- Updates to integration tests to use dynamic table names and improved UUID normalization.
- Adjustments in the Field data class to include DB flavor information.
Reviewed Changes
Copilot reviewed 37 out of 42 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| core/src/main/kotlin/net/samyn/kapper/internal/KapperImpl.kt | Updated field extraction to pass the connection’s DB flavor. |
| core/src/main/kotlin/net/samyn/kapper/internal/DbFlavour.kt | Extended to include Oracle and MSSQL support. |
| core/src/main/kotlin/net/samyn/kapper/internal/Converters.kt | Adjusted timezone conversions and added new conversion functions. |
| core/src/main/kotlin/net/samyn/kapper/Field.kt | Added a new dbFlavour parameter to the Field data class. |
| Integration test files | Updated table naming, UUID normalization, and query syntax to support multiple DB flavors. |
| README.md & build workflows | Updated statuses and build parameters to reflect new DB support. |
Files not reviewed (5)
- .run/Integration Tests (ALL).run.xml: Language not supported
- .run/Integration Tests (MS SQL Server).run.xml: Language not supported
- .run/Integration Tests (Oracle).run.xml: Language not supported
- .run/Integration Tests.run.xml: Language not supported
- buildSrc/src/main/kotlin/kapper.library-conventions.gradle.kts: Language not supported
Comments suppressed due to low confidence (2)
core/src/main/kotlin/net/samyn/kapper/internal/Converters.kt:23
- Changing the time zone conversion from UTC to systemDefault may lead to unexpected behavior; please confirm that this change is intentional and update any related documentation accordingly.
value.atZone(java.time.ZoneOffset.systemDefault()).toInstant()
core/src/main/kotlin/net/samyn/kapper/Field.kt:13
- The addition of the 'dbFlavour' parameter to the Field data class requires updates to all Field instantiations; please ensure that all usages are revised accordingly.
data class Field(val columnIndex: Int, val type: JDBCType, val typeName: String, val dbFlavour: DbFlavour)
PR Code Suggestions ✨Latest suggestions up to dd0d9b4
Previous suggestions✅ Suggestions up to commit 5cb0c29
Suggestions up to commit b5f7f27
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Code Coverage
|
Test Results 43 files + 5 43 suites +5 34s ⏱️ +4s Results for commit a591979. ± Comparison against base commit 013b188. This pull request removes 110 and adds 195 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
- Update integration tests to support Oracle - Various updates to converter/mapper functions to support Oracle types - Refactor converter tests to be more readable
18d99e2 to
5cb0c29
Compare
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
dd0d9b4 to
a591979
Compare
|



Support for: