ReconnectorType alias moved to ormtypes.hpp

This commit is contained in:
silverqx
2022-01-13 17:08:56 +01:00
parent 5f49aa54d0
commit 35a68dd0fd
5 changed files with 8 additions and 13 deletions
-3
View File
@@ -160,9 +160,6 @@ namespace Orm
/*! Get the query post processor used by the connection. */
const QueryProcessor &getPostProcessor() const override;
// TODO duplicate, extract to some internal types silverqx
/*! Reconnector lambda type. */
using ReconnectorType = std::function<void(const DatabaseConnection &)>;
/*! Set the reconnect instance on the connection. */
DatabaseConnection &setReconnector(const ReconnectorType &reconnector);
-3
View File
@@ -148,9 +148,6 @@ namespace Query
/*! Reset the default connection name. */
void resetDefaultConnection() final;
// TODO duplicate, extract to some internal types silverqx
/*! Reconnector lambda type. */
using ReconnectorType = std::function<void(const DatabaseConnection &)>;
/*! Set the database reconnector callback. */
DatabaseManager &setReconnector(const ReconnectorType &reconnector);
+1 -2
View File
@@ -86,8 +86,7 @@ namespace Orm
static void resetDefaultConnection();
/*! Set the database reconnector callback. */
static DatabaseManager &setReconnector(
const DatabaseManager::ReconnectorType &reconnector);
static DatabaseManager &setReconnector(const ReconnectorType &reconnector);
/* Proxy methods to the DatabaseConnection */
/*! Begin a fluent query against a database table for the connection. */
+6 -4
View File
@@ -14,10 +14,7 @@ TINY_SYSTEM_HEADER
#include "orm/constants.hpp"
#include "orm/query/expression.hpp"
// TODO divide OrmTypes to internal and types which user will / may need, so divide to two files silverqx
/* 👆 I have good idea hot to do that, public types will be tinytypes.hpp and private will be
types.hpp, and divide it as most as possible when needed, so eg Reconnector type to
types/reconnectortype.hpp. */
// TODO types, divide to public/private silverqx
TINYORM_BEGIN_COMMON_NAMESPACE
@@ -26,12 +23,17 @@ namespace Orm
// NOLINTNEXTLINE(google-build-using-namespace)
using namespace Orm::Constants;
class DatabaseConnection;
namespace Query
{
class Builder;
}
using QueryBuilder = Query::Builder;
/*! Reconnector lambda type. */
using ReconnectorType = std::function<void(const DatabaseConnection &)>;
/*! Type for the database column. */
using Column = std::variant<QString, Query::Expression>;