summaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/database')
-rw-r--r--src/database/select_query.hpp2
-rw-r--r--src/database/table.cpp2
-rw-r--r--src/database/table.hpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/database/select_query.hpp b/src/database/select_query.hpp
index f4d71af..872001c 100644
--- a/src/database/select_query.hpp
+++ b/src/database/select_query.hpp
@@ -79,7 +79,7 @@ struct SelectQuery: public Query
using ColumnsType = std::tuple<T...>;
using ColumnType = typename std::remove_reference<decltype(std::get<N>(std::declval<ColumnsType>()))>::type;
- this->body += " "s + ColumnType::name;
+ this->body += " " + std::string{ColumnType::name};
if (N < (sizeof...(T) - 1))
this->body += ", ";
diff --git a/src/database/table.cpp b/src/database/table.cpp
index 5929f33..160f426 100644
--- a/src/database/table.cpp
+++ b/src/database/table.cpp
@@ -4,7 +4,7 @@ std::set<std::string> get_all_columns_from_table(sqlite3* db, const std::string&
{
std::set<std::string> result;
char* errmsg;
- std::string query{"PRAGMA table_info("s + table_name + ")"};
+ std::string query{"PRAGMA table_info(" + table_name + ")"};
log_debug(query);
int res = sqlite3_exec(db, query.data(), [](void* param, int columns_nb, char** columns, char**) -> int {
constexpr int name_column = 1;
diff --git a/src/database/table.hpp b/src/database/table.hpp
index f2f70bb..c9e35d3 100644
--- a/src/database/table.hpp
+++ b/src/database/table.hpp
@@ -17,7 +17,7 @@ template <typename ColumnType>
void add_column_to_table(sqlite3* db, const std::string& table_name)
{
const std::string name = ColumnType::name;
- std::string query{"ALTER TABLE "s + table_name + " ADD " + ColumnType::name + " " + TypeToSQLType<typename ColumnType::real_type>::type};
+ std::string query{"ALTER TABLE " + table_name + " ADD " + ColumnType::name + " " + TypeToSQLType<typename ColumnType::real_type>::type};
log_debug(query);
char* error;
const auto result = sqlite3_exec(db, query.data(), nullptr, nullptr, &error);