-
Notifications
You must be signed in to change notification settings - Fork 49
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
Added support for parsing timestamptz as UTCDateTime #263
Conversation
) | ||
|
||
function _pqparse(::Type{T}, str::AbstractString) where T<:Union{UTCDateTime, ZonedDateTime} |
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.
[JuliaFormatter] reported by reviewdog 🐶
function _pqparse(::Type{T}, str::AbstractString) where T<:Union{UTCDateTime, ZonedDateTime} | |
function _pqparse( | |
::Type{T}, str::AbstractString | |
) where {T<:Union{UTCDateTime,ZonedDateTime}} |
result = execute( | ||
conn, | ||
"SELECT $test_str;"; | ||
binary_format=binary_format, | ||
type_map=Dict(:timestamptz => UTCDateTime), | ||
) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
parsed = func(LibPQ.PQValue{oid}(result, 1, 1)) | ||
@test isequal(parsed, data) | ||
@test typeof(parsed) == UTCDateTime | ||
parsed_no_oid = func(LibPQ.PQValue(result, 1, 1)) | ||
@test isequal(parsed_no_oid, data) | ||
@test typeof(parsed_no_oid) == UTCDateTime |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
end | ||
end |
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.
[JuliaFormatter] reported by reviewdog 🐶
end | |
end |
FWIW, the error codes CI check is also failing on nightly and the formatting suggestions seem pretty borked. Should probably just fix them in separate MRs? |
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.
Looks fine to me. The formatter is needlessly strict sometimes
Thanks, I'm just gonna give @iamed2 a chance to comment before merging and tagging. |
Comments addressed in the MR above. |
Addressing post-merge comments on #263
Depends on iamed2/UTCDateTimes.jl#11