orm made method static and noexcept

This commit is contained in:
silverqx
2024-11-06 13:15:54 +01:00
parent 10c0f98b9c
commit f950e412ac
@@ -251,8 +251,8 @@ namespace Private
getHasQueryByExistenceCheck(const QString &comparison, qint64 count,
Relation<Related> &relation) const;
/*! Check if we can run an "exists" query to optimize performance. */
inline bool
canUseExistsForExistenceCheck(const QString &comparison, qint64 count) const;
inline static bool
canUseExistsForExistenceCheck(const QString &comparison, qint64 count) noexcept;
private:
/*! Static cast this to a child's instance TinyBuilder type. */
@@ -564,7 +564,7 @@ namespace Private
template<typename Model>
bool QueriesRelationships<Model>::canUseExistsForExistenceCheck(
const QString &comparison, const qint64 count) const
const QString &comparison, const qint64 count) noexcept
{
return (comparison == GE || comparison == LT) && count == 1;
}