-
Notifications
You must be signed in to change notification settings - Fork 348
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
Add raw joda time encoding to quill-async
#837
Conversation
@getquill/maintainers I guess we need |
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.
Everything looks good. Just few pedantic comments.
"decode local date time types" in { | ||
case class DateEncodingTestEntity(v1: LocalDateTime, v2: LocalDateTime, v3: LocalDateTime) | ||
"decode local date types and local date time type" in { | ||
case class DateEncodingTestEntity(v1: LocalDate, v2: LocalDateTime, v3: LocalDateTime) |
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.
Could you remove v3
field? It duplicates v2
.
Also it's better to change test name to "decode LocalDate and LocalDateTime types".
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.
v3
has different sql type so let's keep it, to double-sure everything's ok
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.
Sorry, did not notice that.
"decode local date types" in { | ||
case class DateEncodingTestEntity(v1: LocalDate, v2: LocalDate, v3: LocalDate) | ||
val entity = DateEncodingTestEntity(LocalDate.now, LocalDate.now, LocalDate.now) | ||
"encodes joda local date and local date time type" in { |
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.
May be change it to "decode joda LocalDate and LocalDateTime types" just for consistency with other tests names and correct class names?
"encodes localdate type" in { | ||
case class DateEncodingTestEntity(v1: LocalDate, v2: LocalDate) | ||
val entity = DateEncodingTestEntity(LocalDate.now, LocalDate.now) | ||
"encodes joda localdate and localdatetime type" in { |
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.
Let's use correct case for class name here - LocalDate
and LocalDateTime
. WDYT?
"encodes localdatetime type" in { | ||
case class DateEncodingTestEntity(v1: LocalDateTime, v2: LocalDateTime) | ||
val entity = DateEncodingTestEntity(LocalDateTime.now, LocalDateTime.now) | ||
"encodes localdate and localdatetime type" in { |
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.
Here too.
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.
sure!
Fixes #836
Problem
Async driver support joda time by default but raw encoders are missing
Solution
Notes
Breaking Changes!
java.time.LocalDate
now supports only date sql types,java.time.LocalDateTime
- onlytimestamp
sql types. Joda times follow this conventions accordingly.Exception is made to
java.util.Date
it supports bothdate
andtimestamp
types due to historical moments (java.sql.Timestamp
extentsjava.util.Date
)Checklist
README.md
if applicable[WIP]
to the pull request title if it's work in progresssbt scalariformFormat test:scalariformFormat
to make sure that the source files are formatted@getquill/maintainers