WIP: remove the old database abstraction layer
remove such classes: - DbBase - DbConn - DbTextStream - Db while here: - remove: TextStream, SLog, TexTextStream
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2016-2021, Tomasz Sowa
|
||||
* Copyright (c) 2016-2024, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -34,12 +34,15 @@
|
||||
|
||||
|
||||
#include "core/log.h"
|
||||
#include "core/misc.h"
|
||||
#include "core/plugin.h"
|
||||
#include "mdb.h"
|
||||
#include "funregistermail.h"
|
||||
#include "registermail_info.h"
|
||||
#include "funregistermail_showusers.h"
|
||||
#include "functions/functions.h"
|
||||
#include "models/migration.h"
|
||||
|
||||
|
||||
|
||||
namespace Winix
|
||||
@@ -158,6 +161,19 @@ void InitPlugin(PluginInfo & info)
|
||||
}
|
||||
|
||||
|
||||
void DatabaseMigration(PluginInfo & info)
|
||||
{
|
||||
bool ok = true;
|
||||
RegisterMail register_mail;
|
||||
|
||||
ok = ok && Migration::do_migration(info.model_connector, register_mail);
|
||||
|
||||
info.res = ok;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AddEzcFunctions(PluginInfo & info);
|
||||
|
||||
} // namespace
|
||||
@@ -170,25 +186,20 @@ void Init(PluginInfo & info)
|
||||
{
|
||||
using namespace MailRegister;
|
||||
|
||||
mdb.SetConn(info.db->GetConn());
|
||||
mdb.LogQueries(info.config->log_db_query);
|
||||
|
||||
fun_rm.SetMDb(&mdb);
|
||||
fun_rm.SetInfo(&rm_info);
|
||||
|
||||
fun_rm_showusers.SetMDb(&mdb);
|
||||
fun_rm_showusers.SetInfo(&rm_info);
|
||||
|
||||
info.plugin->Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
|
||||
info.plugin->Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
|
||||
info.plugin->Assign(WINIX_MAKE_DATABASE_MIGRATION, DatabaseMigration);
|
||||
info.plugin->Assign(WINIX_CREATE_FUNCTIONS, AddWinixFunctions);
|
||||
|
||||
info.plugin->Assign(WINIX_PLUGIN_INIT, InitPlugin);
|
||||
info.plugin->Assign(WINIX_PROCESS_REQUEST, ProcessRequest);
|
||||
|
||||
|
||||
|
||||
info.p1 = (void*)(plugin_name);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user