10#ifndef ElogAttachment_H
11#define ElogAttachment_H 1
#define ClassDef(name, id)
ElogAttachment.h Class for the table: attachment_.
ElogConnection * connectionDB
connection to the database
virtual ~ElogAttachment()
static int CheckAttachmentExists(int record_id, int attachment_number)
check attachment exists in the database: 1- true, 0 - false, <0 - database operation error
static ElogAttachment * GetAttachment(TString file_path)
get attachment from the database
void Print()
print information about current attachment
int GetAttachmentNumber()
get attachment number of the current attachment
TString str_file_path
file path
static int DeleteAttachment(int record_id, int attachment_number)
delete attachment from the database
static ElogAttachment * CreateAttachment(int record_id, int attachment_number, TString file_path)
add new attachment to the database
static int CheckAttachmentExists(TString file_path)
check attachment exists in the database: 1- true, 0 - false, <0 - database operation error
int GetRecordId()
get record id of the current attachment
TString GetFilePath()
get file path of the current attachment
static ElogAttachment * GetAttachment(int record_id, int attachment_number)
get attachment from the database
int i_attachment_number
attachment number
static int DeleteAttachment(TString file_path)
delete attachment from the database
int SetRecordId(int record_id)
set record id of the current attachment
ElogAttachment(ElogConnection *db_connect, int record_id, int attachment_number, TString file_path)
static int PrintAll()
print all attachments
int SetFilePath(TString file_path)
set file path of the current attachment
int SetAttachmentNumber(int attachment_number)
set attachment number of the current attachment