New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timestamp fixes, uuid support #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Overall, the changes look great but can you check my comments?
build.gradle
Outdated
// TODO: upgrade to 5+ when dropping Java 8 supports | ||
implementation 'com.zaxxer:HikariCP:4.0.3' | ||
implementation "com.zaxxer:HikariCP:5.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this major upgrade this time? We'll do this in the future but not now.
@@ -9,18 +9,36 @@ object HikariCP { | |||
|
|||
private val pools: ConcurrentMap<String, HikariDataSource> = ConcurrentHashMap() | |||
|
|||
fun default(url: String, username: String, password: String): HikariDataSource { | |||
@Deprecated( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this? I'm not planning to make this deprecated.
url: String, | ||
username: String, | ||
password: String, | ||
configPropertiesFn: HikariConfig.() -> Unit = { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice enhancement!
@@ -19,7 +27,7 @@ open class Session( | |||
open val autoGeneratedKeys: List<String> = listOf(), | |||
var transactional: Boolean = false, | |||
open val strict: Boolean = false | |||
) : AutoCloseable { | |||
) : Closeable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine but can you share the reason why I've changed this interface to sub interface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows to utilize use
function build-in Kotlin
https://stackoverflow.com/a/46843631/5740547
If you take a look in its source code it is way reacher than LoanPattern
. Check out the source code, not a copy-paste in stackoverflow.
is org.joda.time.LocalTime -> this.setTime(idx, java.sql.Time(v.toDateTimeToday().millis)) | ||
is java.util.Date -> this.setTimestamp(idx, Timestamp(v.time)) | ||
is java.sql.Timestamp -> this.setTimestamp(idx, v) | ||
is java.sql.Timestamp -> this.setTimestamp(idx, v) // extends java.util.Date |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the order here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM. Will release a new version shortly
Recently I've revisited Spring's JdbcTemplate. So much history in it's implementation, so many layers, so deep stacktraces Your lib is totally different. Well done! Waiting for new version! Have a nice day! |
On moving from 1.6.1 to 1.6.2 we now get the following:
The query is using a |
@busches Confirm it. I'll make a fix soon |
Closes #48
Plus:
HikariCP.default(...)
because redundant