removed using aliases (used using declaration)

- added/updated comments
This commit is contained in:
silverqx
2024-02-14 13:22:31 +01:00
parent 6c029d54d6
commit 2c28cd842e
15 changed files with 28 additions and 21 deletions

View File

@@ -28,8 +28,8 @@ namespace Orm::Tiny
template<typename Derived>
class SoftDeletes;
/*! Alias for the GuardedModel. */
using GuardedModel = Concerns::GuardedModel; // Don't remove
/*! Alias for the Concerns::GuardedModel, shortcut alias. */
using Concerns::GuardedModel; // Don't remove // NOLINT(misc-unused-using-decls)
// TODO model missing methods Model::loadMissing() silverqx
// TODO model missing saveOrFail(), updateOrFail(), deleteOrFail(), I will need to implement ManagesTransaction::transaction(callback) method silverqx

View File

@@ -36,8 +36,8 @@ namespace Tiny::Relations
} // namespace Tiny::Relations
/*! Alias for the Pivot, shortcut alias. */
using Pivot = Tiny::Relations::Pivot;
/*! Alias for the Relations::Pivot, shortcut alias. */
using Tiny::Relations::Pivot; // NOLINT(misc-unused-using-decls)
} // namespace Orm

View File

@@ -210,8 +210,8 @@ namespace Concerns
} // namespace Concerns
} // namespace Tiny
/*! Alias for the Orm::Tiny::One, shortcut alias. */
using One = Tiny::One;
/*! Alias for the Tiny::One, shortcut alias. */
using Tiny::One; // NOLINT(misc-unused-using-decls)
} // namespace Orm

View File

@@ -35,7 +35,8 @@ namespace Types
} // namespace Types
using ConnectionOverride = Tiny::Types::ConnectionOverride;
/*! Alias for the Types::ConnectionOverride, shortcut alias. */
using Tiny::Types::ConnectionOverride; // NOLINT(misc-unused-using-decls)
} // namespace Orm::Tiny

View File

@@ -67,8 +67,8 @@ namespace Types
} // namespace Types
/*! Alias for the ModelAttributes. */
using ModelAttributes = Tiny::Types::ModelAttributes;
/*! Alias for the Types::ModelAttributes, shortcut alias. */
using Tiny::Types::ModelAttributes; // NOLINT(misc-unused-using-decls)
} // namespace Orm::Tiny

View File

@@ -406,8 +406,8 @@ namespace Types
} // namespace Types
/*! Alias for the SyncChanges. */
using SyncChanges = Tiny::Types::SyncChanges;
/*! Alias for the Types::SyncChanges, shortcut alias. */
using Tiny::Types::SyncChanges; // NOLINT(misc-unused-using-decls)
} // namespace Tiny
} // namespace Orm

View File

@@ -45,7 +45,8 @@ namespace Types
} // namespace Types
using Log = Types::Log;
/*! Alias for the Types::Log, shortcut alias. */
using Types::Log; // NOLINT(misc-unused-using-decls)
} // namespace Orm

View File

@@ -98,7 +98,8 @@ namespace Types
} // namespace Types
using SqlQuery = Types::SqlQuery;
/*! Alias for the Types::SqlQuery, shortcut alias. */
using Types::SqlQuery; // NOLINT(misc-unused-using-decls)
} // namespace Orm

View File

@@ -28,7 +28,8 @@ namespace Types
} // namespace Types
using StatementsCounter = Types::StatementsCounter;
/*! Alias for the Types::StatementsCounter, shortcut alias. */
using Types::StatementsCounter; // NOLINT(misc-unused-using-decls)
} // namespace Orm

View File

@@ -971,7 +971,7 @@ void DatabaseManager::registerQMetaTypesForQt5()
QMetaType::registerEqualsComparator<QVector<QVariantMap>>();
#ifndef TINYORM_DISABLE_ORM
using AttributeItem = Tiny::AttributeItem;
using Tiny::AttributeItem;
if (!QMetaType::hasRegisteredComparators<AttributeItem>())
QMetaType::registerEqualsComparator<AttributeItem>();

View File

@@ -54,7 +54,7 @@ void SQLiteSchemaBuilder::dropAllTables() const
if (m_connection->getDatabaseName() != in_memory)
return refreshDatabaseFile(); // clazy:exclude=returning-void-expression
using SQLiteSchemaGrammar = Grammars::SQLiteSchemaGrammar;
using Grammars::SQLiteSchemaGrammar;
m_connection->selectFromWriteConnection(SQLiteSchemaGrammar::
compileEnableWriteableSchema());
@@ -69,7 +69,7 @@ void SQLiteSchemaBuilder::dropAllTables() const
void SQLiteSchemaBuilder::dropAllViews() const
{
using SQLiteSchemaGrammar = Grammars::SQLiteSchemaGrammar;
using Grammars::SQLiteSchemaGrammar;
m_connection->selectFromWriteConnection(SQLiteSchemaGrammar::
compileEnableWriteableSchema());

View File

@@ -15,7 +15,8 @@ using Orm::Constants::Progress;
using Orm::Constants::SIZE_;
using Orm::Constants::UPDATED_AT;
using NullVariant = Orm::Utils::NullVariant;
using Orm::Utils::NullVariant;
using TypeUtils = Orm::Utils::Type;
using Orm::Tiny::AttributeItem;

View File

@@ -16,7 +16,8 @@ using Orm::Constants::Progress;
using Orm::Constants::SIZE_;
using Orm::Constants::UPDATED_AT;
using NullVariant = Orm::Utils::NullVariant;
using Orm::Utils::NullVariant;
using TypeUtils = Orm::Utils::Type;
using Orm::Tiny::AttributeItem;

View File

@@ -22,7 +22,8 @@ using Orm::Constants::pivot_;
using Orm::Utils::Helpers;
using NullVariant = Orm::Utils::NullVariant;
using Orm::Utils::NullVariant;
using TypeUtils = Orm::Utils::Type;
using Orm::Tiny::AttributeItem;

View File

@@ -20,7 +20,7 @@ namespace Types
{
struct Log;
}
using Log = Orm::Types::Log;
using Orm::Types::Log;
class DatabaseConnection;
} // namespace Orm