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.
22 lines
568 B
C++
22 lines
568 B
C++
#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 {};
|
|
}
|