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/update_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/update_query.hpp')
-rw-r--r-- | src/database/update_query.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/database/update_query.hpp b/src/database/update_query.hpp index a29ac3f..c2b819d 100644 --- a/src/database/update_query.hpp +++ b/src/database/update_query.hpp @@ -1,7 +1,8 @@ #pragma once -#include <database/query.hpp> #include <database/engine.hpp> +#include <database/query.hpp> +#include <database/row.hpp> using namespace std::string_literals; @@ -102,3 +103,11 @@ struct UpdateQuery: public Query actual_bind(statement, value.value, sizeof...(T)); } }; + +template <typename... T> +void update(Row<T...>& row, DatabaseEngine& db) +{ + UpdateQuery query(row.table_name, row.columns); + + query.execute(db, row.columns); +} |