-
Notifications
You must be signed in to change notification settings - Fork 21
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
RowDecoder #39
Comments
Sure, that would be great! For the PR, please use Or, if you prefer, feel free to send me (or point me to) whatever you currently have, and I can integrate it (and credit you in the release notes). Thanks! |
Here it is: https://gist.github.com/khanlou/ff3e8788026b35150a9670b87b676ad2 Dates get a little hairy, because you do need a timezone to convert some of the fields to date. I think UTC is a reasonable default since that's what most servers should be running, but you could also parameterize the TZ on RowDecoder. |
Thanks! I hope to take a look this weekend. |
This looks good; thank you. I'm going to try adding a couple of things:
|
I like both of those ideas. I’m messing with time zone heavy code today and assuming utc on decode I’m not sure is the right decision. |
Released in v1.5.0 |
I've written a RowDecoder, which lets you easily convert from a
PostgresClientKit.Row
to a Codable struct, likeIt's working well in my project, and if you think it'd be good to add to this library, let me know and I would be happy to clean it up and pull request it.
The text was updated successfully, but these errors were encountered: