diff --git a/support/include/utils/db/sqlite/db_select.hpp b/support/include/utils/db/sqlite/db_select.hpp index 8bc3c494..a360a4f1 100644 --- a/support/include/utils/db/sqlite/db_select.hpp +++ b/support/include/utils/db/sqlite/db_select.hpp @@ -34,7 +34,7 @@ public: context(sqlite3 &db3_, std::string table_name_) : db_context_t(db3_, table_name_) {} - using w_t = db_where_with_limit_t; + using w_t = db_where_limit_t; std::vector columns; std::map count_columns; diff --git a/support/include/utils/db/sqlite/db_update.hpp b/support/include/utils/db/sqlite/db_update.hpp index 902029b6..40359aee 100644 --- a/support/include/utils/db/sqlite/db_update.hpp +++ b/support/include/utils/db/sqlite/db_update.hpp @@ -33,7 +33,8 @@ public: struct context final : db_context_t { context(sqlite3 &db3_, std::string table_name_) : db_context_t(db3_, table_name_) {} - using w_t = db_where_with_limit_t; + + using w_t = db_where_limit_t; std::map column_values; std::optional limit; diff --git a/support/include/utils/db/sqlite/db_where_limit_t.hpp b/support/include/utils/db/sqlite/db_where_limit_t.hpp index 1d5c6ac0..8892ec29 100644 --- a/support/include/utils/db/sqlite/db_where_limit_t.hpp +++ b/support/include/utils/db/sqlite/db_where_limit_t.hpp @@ -158,16 +158,16 @@ struct db_comp_next_limit_t final { auto not_equals(db_types_t value) -> wn_t { return create("!=", value); }; }; -template struct db_where_with_limit_t final { +template struct db_where_limit_t final { std::shared_ptr ctx; - using cn_t = db_comp_next_limit_t; - using wn_t = db_where_next_limit_t; - using n_t = db_next_limit_t; + using cn_t = db_comp_next_limit_t; + using wn_t = db_where_next_limit_t; + using n_t = db_next_limit_t; - using group_func_t = std::function; + using group_func_t = std::function; - using action_t = std::variant; + using action_t = std::variant; std::vector actions{}; std::vector sub_actions{}; @@ -186,7 +186,7 @@ template struct db_where_with_limit_t final { stream << ' ' << next.action << ' ' << dump(idx, next.get_next()); }, - [&idx, &stream](const db_where_with_limit_t &where) { + [&idx, &stream](const db_where_limit_t &where) { stream << '(' << dump(idx, where) << ')'; }, }, @@ -203,7 +203,7 @@ template struct db_where_with_limit_t final { } [[nodiscard]] auto group(group_func_t func) -> wn_t { - db_where_with_limit_t where{ctx}; + db_where_limit_t where{ctx}; func(where); actions.emplace_back(std::move(where));