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:
2024-06-22 18:03:54 +02:00
parent 5d457f3d4b
commit 6aa100f12c
138 changed files with 6658 additions and 12402 deletions

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2022, Tomasz Sowa
* Copyright (c) 2008-2024, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,6 +33,7 @@
*/
#include "notify.h"
#include "core/misc.h"
#include "templates/templates.h"
#include "core/request.h"
#include "core/config.h"

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2022, Tomasz Sowa
* Copyright (c) 2008-2024, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,6 +33,7 @@
*/
#include "notifythread.h"
#include "core/misc.h"
namespace Winix
@@ -210,7 +211,7 @@ bool queue_end;
// second thread
void NotifyThread::SendMail()
{
notify_stream.Clear();
notify_stream.clear();
size_t lang_id = TemplatesNotifyFunctions::notify_user_msg.lang;
size_t template_index = TemplatesNotifyFunctions::notify_msg.template_index;
@@ -250,7 +251,9 @@ void NotifyThread::SendMail()
generator.CanUseCache(false);
generator.Generate(notify_stream);
SendMail(TemplatesNotifyFunctions::notify_user_msg.email, notify_stream.Str());
notify_stream.to_str(msg_str);
SendMail(TemplatesNotifyFunctions::notify_user_msg.email, msg_str);
msg_str.clear();
}
}

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2018, Tomasz Sowa
* Copyright (c) 2008-2024, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -80,6 +80,7 @@ private:
Patterns patterns;
TemplatesNotifyFunctions::NotifyStream notify_stream;
Ezc::Generator<TemplatesNotifyFunctions::NotifyStream, true> generator;
std::wstring msg_str;
virtual bool Init();
virtual bool SignalReceived();

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2018, Tomasz Sowa
* Copyright (c) 2008-2024, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,13 +50,13 @@ Ezc::Functions<NotifyStream> ezc_functions;
NotifyUserMsg notify_user_msg;
NotifyMsg notify_msg;
static std::string qencode_tmp;
static pt::WTextStream qencode_tmp;
void fil_qencode(Info & i)
{
// QEncode can be used in other threads
QEncode(i.in.Str(), qencode_tmp);
q_encode(i.in, qencode_tmp);
i.out << qencode_tmp;
}

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* Copyright (c) 2008-2024, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,6 @@
#define headerfile_winix_notify_templatesnotify
#include "ezc.h"
#include "core/textstream.h"
#include "notifypool.h"
namespace Winix
@@ -45,7 +44,7 @@ namespace Winix
namespace TemplatesNotifyFunctions
{
typedef TextStream<std::wstring> NotifyStream;
typedef pt::WTextStream NotifyStream;
typedef Ezc::FunInfo<NotifyStream> Info;
extern NotifyUserMsg notify_user_msg;