Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Resolved review suggestions of 'order by kth column'
Browse files Browse the repository at this point in the history
* Also const-corrected a couple of order_by_t's methods
  • Loading branch information
trueqbit committed Apr 2, 2022
1 parent f4c9052 commit faed41a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dev/conditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,13 @@ namespace sqlite_orm {

order_by_t(expression_type expression_) : order_by_base(), expression(std::move(expression_)) {}

self asc() {
self asc() const {
auto res = *this;
res.asc_desc = 1;
return res;
}

self desc() {
self desc() const {
auto res = *this;
res.asc_desc = -1;
return res;
Expand Down
4 changes: 1 addition & 3 deletions dev/literal.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once

#include <utility> // std::move

namespace sqlite_orm {
namespace internal {

Expand All @@ -12,7 +10,7 @@ namespace sqlite_orm {
struct literal_holder {
using type = T;

T value;
type value;
};

}
Expand Down
8 changes: 3 additions & 5 deletions include/sqlite_orm/sqlite_orm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2756,8 +2756,6 @@ namespace sqlite_orm {

// #include "literal.h"

#include <utility> // std::move

namespace sqlite_orm {
namespace internal {

Expand All @@ -2768,7 +2766,7 @@ namespace sqlite_orm {
struct literal_holder {
using type = T;

T value;
type value;
};

}
Expand Down Expand Up @@ -3203,13 +3201,13 @@ namespace sqlite_orm {

order_by_t(expression_type expression_) : order_by_base(), expression(std::move(expression_)) {}

self asc() {
self asc() const {
auto res = *this;
res.asc_desc = 1;
return res;
}

self desc() {
self desc() const {
auto res = *this;
res.asc_desc = -1;
return res;
Expand Down

0 comments on commit faed41a

Please sign in to comment.