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) 2010-2014, Tomasz Sowa
|
||||
* Copyright (c) 2010-2024, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -37,49 +37,34 @@
|
||||
|
||||
#include <vector>
|
||||
#include "ticket.h"
|
||||
#include "db/dbbase.h"
|
||||
#include "core/error.h"
|
||||
#include "core/winixmodeldeprecated.h"
|
||||
|
||||
namespace Winix
|
||||
|
||||
namespace Winix::Ticket
|
||||
{
|
||||
|
||||
|
||||
namespace Ticket
|
||||
{
|
||||
|
||||
|
||||
class TDb : public DbBase
|
||||
class TDb : public WinixModelDeprecated
|
||||
{
|
||||
public:
|
||||
|
||||
bool IsTicket(long file_id);
|
||||
Error GetTicket(long file_id, Ticket & ticket);
|
||||
Error GetTickets(const std::vector<long> & file_id_tab, std::vector<Ticket> & ticket_tab, bool clear_tab = true);
|
||||
Error AddTicket(const Ticket & ticket);
|
||||
Error RemoveAddTicket(const Ticket & ticket); // first removing and then adding a ticket
|
||||
Error RemoveTicket(long file_id);
|
||||
bool IsTicket(long file_id);
|
||||
void GetTicket(long file_id, Ticket & ticket);
|
||||
void GetTickets(const std::vector<long> & file_id_tab, std::vector<Ticket> & ticket_tab, bool clear_tab = true);
|
||||
bool AddTicket(Ticket & ticket);
|
||||
bool RemoveAddTicket(Ticket & ticket); // first removing and then adding a ticket
|
||||
bool RemoveTicket(long file_id);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
DbTextStream query;
|
||||
Ticket empty_ticket;
|
||||
Ticket::TicketParam tic_par;
|
||||
|
||||
int cfileid;
|
||||
int cparam;
|
||||
int cintv;
|
||||
int cdecv;
|
||||
|
||||
void SetTicketColumns(PGresult * r);
|
||||
void ReadTicketPar(PGresult * r, Ticket::TicketParam & par, int row);
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
} // namespace Winix
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user