mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-05-03 23:19:28 -05:00
ReconnectorType alias moved to ormtypes.hpp
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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
@@ -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. */
|
||||
|
||||
@@ -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>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user