diff options
author | louiz’ <louiz@louiz.org> | 2018-04-13 23:35:06 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-04-13 23:35:06 +0200 |
commit | 4bd7b6981bb49dd4111c908aaa34c34f677171f4 (patch) | |
tree | 918347adb112c04455e23fcad06626e5635b6ad4 /src/database/select_query.hpp | |
parent | de8267fa3f4f4e1d61bcf35fb36c6664f520a385 (diff) | |
download | biboumi-4bd7b6981bb49dd4111c908aaa34c34f677171f4.tar.gz biboumi-4bd7b6981bb49dd4111c908aaa34c34f677171f4.tar.bz2 biboumi-4bd7b6981bb49dd4111c908aaa34c34f677171f4.tar.xz biboumi-4bd7b6981bb49dd4111c908aaa34c34f677171f4.zip |
Refactor that fixes a compilation issue in Release mode
Some template specialization were not found, because they were not declared
at the point they were used.
We moved things around, things are less inter-dependant, and also now it
works.
Diffstat (limited to 'src/database/select_query.hpp')
-rw-r--r-- | src/database/select_query.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/database/select_query.hpp b/src/database/select_query.hpp index 3013dd8..0de4fe5 100644 --- a/src/database/select_query.hpp +++ b/src/database/select_query.hpp @@ -2,6 +2,8 @@ #include <database/engine.hpp> +#include <database/table.hpp> +#include <database/database.hpp> #include <database/statement.hpp> #include <utils/datetime.hpp> #include <database/query.hpp> @@ -78,6 +80,12 @@ std::string after_column() return {}; } +template <> +std::string before_column<Database::Date>(); + +template <> +std::string after_column<Database::Date>(); + template <typename... T> struct SelectQuery: public Query { @@ -153,3 +161,9 @@ struct SelectQuery: public Query const std::string table_name; }; +template <typename... T> +auto select(const Table<T...> table) +{ + SelectQuery<T...> query(table.name); + return query; +} |