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.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include <database/insert_query.hpp>
|
||||
|
||||
template <>
|
||||
std::string before_value<Database::Date>()
|
||||
{
|
||||
if (Database::engine_type() == DatabaseEngine::EngineType::Sqlite3)
|
||||
return "julianday(";
|
||||
if (Database::engine_type() == DatabaseEngine::EngineType::Postgresql)
|
||||
return "to_timestamp(";
|
||||
return {};
|
||||
}
|
||||
|
||||
template <>
|
||||
std::string after_value<Database::Date>()
|
||||
{
|
||||
if (Database::engine_type() == DatabaseEngine::EngineType::Sqlite3)
|
||||
return ", \"unixepoch\")";
|
||||
if (Database::engine_type() == DatabaseEngine::EngineType::Postgresql)
|
||||
return ")";
|
||||
return {};
|
||||
}
|
||||
Reference in New Issue
Block a user