feat: add order-by logic to database queries - #491
Conversation
|
https://docs.rs/sea-query/latest/sea_query/query/trait.OrderedStatement.html I'm not exactly sure how to plug sea query into this? |
|
Right, updated it to use seaquery's own order_by method. I'm not getting the types down for the time being, will work on it more later. |
|
I have changed it so that instead of ordering on a string of the field name, it uses the fieldref identifier. Last bit is the ownership because it's not happy with the .clone() |
|
Hey @xelab04, how it's going with this PR? Do you need any help from us? |
|
Hey @xelab04, How's it going with this PR? We're thinking of getting this PR in for the next release planned for this week. I see this is mostly done, and if you don't mind, I would love to finish this if you don't have the time. |
|
Hi @ElijahAhianyo I had forgotten about this PR till recently because of a series of illnesses. My apologies. Yes, I remember having mostly completed the PR, but was particularly stumped with creating the proper tests for it. I'd be really happy if you could complete it; I'll also use the opportunity to better understand how I should have done it. I'm sorry it's been in draft for so long. |
Ah, no worries. I'll take this up from here and also wish you a speedy recovery. Thanks a lot for your contribution! |
…m order. API name needs to change though
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…re sematically wrong.
| // TODO: Provide `ExprAdd<T> for FieldRef<T>` implementations for String and | ||
| // LimitedString if Expr::concat is supported |
There was a problem hiding this comment.
Is this something to handle in this PR or a follow-up?
There was a problem hiding this comment.
yeah, Implementing Expr::concat is out of the scope of this PR. There's an issue here.
m4tx
left a comment
There was a problem hiding this comment.
This looks pretty good. Please have a look at my comments, and after these are addressed, I think we could merge this.
Refer to #490