Skip to content

Commit

Permalink
Merge pull request #1243 from FireDaemon/fix_multi_order_by
Browse files Browse the repository at this point in the history
Correct "multi order by" and "group by"
  • Loading branch information
fnc12 authored Nov 10, 2023
2 parents 79f1117 + ce8e719 commit 07a10dc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dev/ast/group_by.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace sqlite_orm {
* Example: storage.get_all<Employee>(group_by(&Employee::name))
*/
template<class... Args>
internal::group_by_t<Args...> group_by(Args&&... args) {
return {std::make_tuple(std::forward<Args>(args)...)};
internal::group_by_t<Args...> group_by(Args... args) {
return {{std::forward<Args>(args)...}};
}
}
4 changes: 2 additions & 2 deletions dev/conditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
return {{std::forward<Args>(args)...}};
}

/**
Expand Down
8 changes: 4 additions & 4 deletions include/sqlite_orm/sqlite_orm.h
Original file line number Diff line number Diff line change
Expand Up @@ -4366,8 +4366,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) {
return {{std::forward<Args>(args)...}};
}

/**
Expand Down Expand Up @@ -7194,8 +7194,8 @@ namespace sqlite_orm {
* Example: storage.get_all<Employee>(group_by(&Employee::name))
*/
template<class... Args>
internal::group_by_t<Args...> group_by(Args&&... args) {
return {std::make_tuple(std::forward<Args>(args)...)};
internal::group_by_t<Args...> group_by(Args... args) {
return {{std::forward<Args>(args)...}};
}
}

Expand Down

0 comments on commit 07a10dc

Please sign in to comment.