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) 2010-2021, Tomasz Sowa
* Copyright (c) 2010-2024, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -65,12 +65,6 @@ void TicketInfo::SetTDb(TDb * ptdb)
}
void TicketInfo::SetDb(Db * pdb)
{
db = pdb;
}
//void TicketInfo::SetConfig(Config * pconfig)
//{
// config = pconfig;
@@ -261,7 +255,7 @@ void TicketInfo::FindCurrentConf()
void TicketInfo::CheckMinMaxValue(pt::Space & space, Ticket::TicketParam & par)
void TicketInfo::CheckMinMaxValue(pt::Space & space, TicketParam & par)
{
std::wstring * type = space.get_wstr(L"type");
@@ -352,7 +346,7 @@ pt::Space & TicketInfo::FindAddMetaByParam(pt::Space & meta, long param)
bool TicketInfo::ReadTicketValue(pt::Space & config_param, long param_id, Ticket::TicketParam & par, const std::wstring & value, pt::Space & meta)
bool TicketInfo::ReadTicketValue(pt::Space & config_param, long param_id, TicketParam & par, const std::wstring & value, pt::Space & meta)
{
if( config_param.is_equal(L"type", L"integer") ||
config_param.is_equal(L"type", L"progress") ||
@@ -491,7 +485,8 @@ void TicketInfo::ReadTicketParam(pt::Space & config_param, Ticket & ticket, long
void TicketInfo::ReadTicketParam(Ticket & ticket, long param_id, const std::wstring & value, pt::Space & meta)
{
ticket_param.Clear();
ticket_param.set_connector(model_connector);
ticket_param.clear();
pt::Space::TableType * params = cur_conf->get_table(L"params");
if( params )
@@ -640,7 +635,7 @@ void TicketInfo::RemoveTicket(long file_id)
*
*/
if( tdb->GetTicket(file_id, rm_ticket) == WINIX_ERR_OK )
if( tdb->IsTicket(file_id) )
{
tdb->RemoveTicket(file_id);
}