changed method position

This commit is contained in:
silverqx
2021-08-03 14:21:59 +02:00
parent 739c69e68a
commit 9d8304ae32
+20 -21
View File
@@ -1692,27 +1692,6 @@ namespace Orm::Tiny
return *this;
}
// CUR reorder this method, also check other methods when I will be up here silverqx
template<typename Model>
Column
Builder<Model>::getCreatedAtColumnForLatestOldest(Column column) const
{
/* Don't initialize column when user passed column expression, only when it
holds the QString type. */
if (std::holds_alternative<QString>(column) &&
std::get<QString>(column).isEmpty()
) {
if (const auto &createdAtColumn = m_model.getCreatedAtColumn();
createdAtColumn.isEmpty()
)
column = CREATED_AT;
else
column = createdAtColumn;
}
return column;
}
template<typename Model>
Builder<Model> &
Builder<Model>::limit(const int value)
@@ -2149,6 +2128,26 @@ namespace Orm::Tiny
return values;
}
template<typename Model>
Column
Builder<Model>::getCreatedAtColumnForLatestOldest(Column column) const
{
/* Don't initialize column when user passed column expression, only when it
holds the QString type. */
if (std::holds_alternative<QString>(column) &&
std::get<QString>(column).isEmpty()
) {
if (const auto &createdAtColumn = m_model.getCreatedAtColumn();
createdAtColumn.isEmpty()
)
column = CREATED_AT;
else
column = createdAtColumn;
}
return column;
}
// FEATURE scopes, anyway std::apply() do the same, will have to investigate it silverqx
// template<typename Model>
// template<typename ...Args>