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

Correct "multi order by" and "group by" #1243

Merged
merged 3 commits into from
Nov 10, 2023
Merged

Conversation

trueqbit
Copy link
Collaborator

The functions multi_order_by() and group_by() should decay their parameters or take arguments by value like all other functions for creating expressions.

@trueqbit trueqbit requested a review from fnc12 November 10, 2023 14:23
@@ -1210,8 +1210,8 @@ namespace sqlite_orm {
* Example: storage.get_all<Singer>(multi_order_by(order_by(&Singer::name).asc(), order_by(&Singer::gender).desc())
*/
template<class... Args>
internal::multi_order_by_t<Args...> multi_order_by(Args&&... args) {
return {std::make_tuple(std::forward<Args>(args)...)};
internal::multi_order_by_t<Args...> multi_order_by(Args... args) {
Copy link
Owner

Choose a reason for hiding this comment

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

This is a good shit!
Копия Cunningham-Chris-Rock-Special jpg

@fnc12 fnc12 merged commit 07a10dc into fnc12:dev Nov 10, 2023
1 check passed
@fnc12
Copy link
Owner

fnc12 commented Nov 10, 2023

thanks @trueqbit

@trueqbit
Copy link
Collaborator Author

thanks @juandent for pointing out this problem

@trueqbit trueqbit deleted the fix_multi_order_by branch November 10, 2023 18:29
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.

2 participants