Version 0.50.0 introduced 2 changes to CurrentTimestamp:
It is now an object instead of a class.
It no longer returns type T, but instead returns an Instant.
So its previous use as a default expression with a timezone compatible column is no longer possible, as even changing to a singleton still requirs OffsetDateTime as the return type:
// compile error - invoke() not found
val t3: Column<OffsetDateTime> = timestampWithTimeZone("t3").defaultExpression(CurrentTimestamp())
// compile error - type mismatch
val t3: Column<OffsetDateTime> = timestampWithTimeZone("t3").defaultExpression(CurrentTimestamp)
This fix introduces a new object CurrentTimestampWithTimeZone for this specific use, to both modules exposed-java-time and exposed-kotlin-datetime.
Rather than repeating the same query builder logic, the 3 CurrentX objects now extend from a base sealed class.
Note: A new object was not added to exposed-joda-time since timestampWithTimeZone() use the same DateTime column type, so it can be used with CurrentDateTime.
Version 0.50.0 introduced 2 changes to
CurrentTimestamp
:T
, but instead returns anInstant
.So its previous use as a default expression with a timezone compatible column is no longer possible, as even changing to a singleton still requirs
OffsetDateTime
as the return type:This fix introduces a new object
CurrentTimestampWithTimeZone
for this specific use, to both modulesexposed-java-time
andexposed-kotlin-datetime
.Rather than repeating the same query builder logic, the 3
CurrentX
objects now extend from a base sealed class.Note: A new object was not added to
exposed-joda-time
sincetimestampWithTimeZone()
use the sameDateTime
column type, so it can be used withCurrentDateTime
.