-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
Make QueryResult fields and QueryResultRow public #336
Comments
I don't think so as we do not want to 'leak' the SQLx types through the API. Although it seems that these integration could be built into the library behind a feature gate. It benefits everyone then. PR would be welcome. Let us know your thoughts? |
Thank you for your reply quickly. I am new to rust, and not very familiar with rust, so I couldn't make a right PR now. |
Yeah that's one solution. But we can also save all the hassle. I was suggesting may be we can instead provide postgis support inside SeaORM. Such that we can simply dump all the boilerplate into a separate file which can be enabled with a |
Oh, I see.But I am sorry I am incapable of implement the features now. |
Hey @qyihua, I think SQLx did try to support postgis crate but it's still WIP. The first comment you made might be helpful for them. Just a side note loll |
I have an issue: |
Related issue: #559 |
Hey @qyihua, sorry for the delay. I think you can use newtype pattern to define a custom serializer / deserializer? pub struct NewStruct(postgis::SomeType);
// implement custom serializer and deserializer for NewStruct
impl ... for NewStruct { ... } |
I'll close this for now. If you still have questions please reopen this :) |
Is this any further along? Even this
as a stop gap solution? |
Hey @Zizico2, would you be interested to implement that stopgap solution? |
Yes! |
Hello team,
I want to use postgis types with postgis crate, but the geometry type is not support currently
So, I use custom type like this:
convert geometry to point need impl sqlx::Decode, So I need QueryResultRow public
Would it be possible for these fields to be changed to be public similar to the relationship data? Alternatively could getter methods be implemented to fetch the row stored within QueryResult?
If they are public, it's able to impl any custom types in database by user.
I use sea-orm in rust. sea-orm and sea-query is wonderful! Thanks yours work!
The text was updated successfully, but these errors were encountered: