Skip to content
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

Merged
merged 2 commits into from
Feb 22, 2023
Merged

Conversation

rofinn
Copy link
Contributor

@rofinn rofinn commented Feb 18, 2023

)

function _pqparse(::Type{T}, str::AbstractString) where T<:Union{UTCDateTime, ZonedDateTime}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
function _pqparse(::Type{T}, str::AbstractString) where T<:Union{UTCDateTime, ZonedDateTime}
function _pqparse(
::Type{T}, str::AbstractString
) where {T<:Union{UTCDateTime,ZonedDateTime}}

Comment on lines +1334 to +1339
result = execute(
conn,
"SELECT $test_str;";
binary_format=binary_format,
type_map=Dict(:timestamptz => UTCDateTime),
)

This comment was marked as outdated.

Comment on lines +1343 to +1348
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.

Comment on lines +1352 to 1353
end
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
end
end

@rofinn
Copy link
Contributor Author

rofinn commented Feb 21, 2023

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?

Copy link
Contributor

@morris25 morris25 left a 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

@rofinn
Copy link
Contributor Author

rofinn commented Feb 21, 2023

Thanks, I'm just gonna give @iamed2 a chance to comment before merging and tagging.

src/parsing.jl Outdated Show resolved Hide resolved
@rofinn rofinn merged commit 4306505 into master Feb 22, 2023
@rofinn rofinn deleted the rf/utcdatetimes branch February 22, 2023 19:19
@JuliaDatabases JuliaDatabases deleted a comment from github-actions bot Feb 22, 2023
src/parsing.jl Show resolved Hide resolved
src/parsing.jl Show resolved Hide resolved
src/parsing.jl Show resolved Hide resolved
src/parsing.jl Show resolved Hide resolved
@rofinn
Copy link
Contributor Author

rofinn commented Feb 23, 2023

Comments addressed in the MR above.

rofinn added a commit that referenced this pull request Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants