FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
|
Database handler for agents. More...
#include <libfossAgentDatabaseHandler.hpp>
Public Member Functions | |
AgentDatabaseHandler (DbManager dbManager) | |
AgentDatabaseHandler (AgentDatabaseHandler &&other) | |
AgentDatabaseHandler (const AgentDatabaseHandler &)=delete | |
virtual | ~AgentDatabaseHandler () |
AgentDatabaseHandler | operator= (const AgentDatabaseHandler &)=delete |
bool | begin () const |
BEGIN a transaction block in DB. More... | |
bool | commit () const |
COMMIT a transaction block in DB. More... | |
bool | rollback () const |
ROLLBACK a transaction block in DB. More... | |
char * | getPFileNameForFileId (unsigned long pfileId) const |
Get the file name of a give pfile id. More... | |
std::string | queryUploadTreeTableName (int uploadId) |
Get the upload tree table name for a given upload id. More... | |
std::vector< unsigned long > | queryFileIdsVectorForUpload (int uploadId, bool ignoreFilesWithMimeType) const |
Get pfile ids for a given upload id. More... | |
Protected Attributes | |
DbManager | dbManager |
DbManager to use. | |
Database handler for agents.
Definition at line 36 of file libfossAgentDatabaseHandler.hpp.
fo::AgentDatabaseHandler::AgentDatabaseHandler | ( | DbManager | _dbManager | ) |
Constructor for AgentDatabaseHandler
_dbManager | DbManager to use |
Definition at line 35 of file libfossAgentDatabaseHandler.cc.
fo::AgentDatabaseHandler::AgentDatabaseHandler | ( | AgentDatabaseHandler && | other | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 43 of file libfossAgentDatabaseHandler.cc.
|
delete |
Explicitly disallow copy constructor
|
virtual |
Default destructor for AgentDatabaseHandler
Definition at line 51 of file libfossAgentDatabaseHandler.cc.
bool fo::AgentDatabaseHandler::begin | ( | ) | const |
BEGIN a transaction block in DB.
Definition at line 60 of file libfossAgentDatabaseHandler.cc.
bool fo::AgentDatabaseHandler::commit | ( | ) | const |
COMMIT a transaction block in DB.
Definition at line 70 of file libfossAgentDatabaseHandler.cc.
char * fo::AgentDatabaseHandler::getPFileNameForFileId | ( | unsigned long | pfileId | ) | const |
Get the file name of a give pfile id.
pfileId | Pfile to search |
SHA1.MD5.SIZE
) Definition at line 91 of file libfossAgentDatabaseHandler.cc.
|
delete |
Explicitly disallow copy constructor
std::vector< unsigned long > fo::AgentDatabaseHandler::queryFileIdsVectorForUpload | ( | int | uploadId, |
bool | ignoreFilesWithMimeType | ||
) | const |
Get pfile ids for a given upload id.
uploadId | Upload id to fetch from |
ignoreFilesWithMimeType | ignore files with particular mimetype |
Definition at line 103 of file libfossAgentDatabaseHandler.cc.
std::string fo::AgentDatabaseHandler::queryUploadTreeTableName | ( | int | uploadId | ) |
Get the upload tree table name for a given upload id.
uploadId | Upload id to check |
Definition at line 114 of file libfossAgentDatabaseHandler.cc.
bool fo::AgentDatabaseHandler::rollback | ( | ) | const |
ROLLBACK a transaction block in DB.
Definition at line 80 of file libfossAgentDatabaseHandler.cc.