23 #include "libfossagent.h" std::vector< unsigned long > queryFileIdsVectorForUpload(int uploadId, bool ignoreFilesWithMimeType) const
Get pfile ids for a given upload id.
char * queryPFileForFileId(fo_dbManager *dbManager, long fileId)
Get the pfile name for a given file ID.
bool commit() const
COMMIT a transaction block in DB.
char * getUploadTreeTableName(fo_dbManager *dbManager, int uploadId)
Get the upload tree table name for a given upload.
bool rollback() const
ROLLBACK a transaction block in DB.
char * getPFileNameForFileId(unsigned long pfileId) const
Get the file name of a give pfile id.
fo_dbManager * getStruct_dbManager() const
unsigned long stringToUnsignedLong(const char *string)
Database handler for agents.
std::string queryUploadTreeTableName(int uploadId)
Get the upload tree table name for a given upload id.
virtual ~AgentDatabaseHandler()
bool begin() const
BEGIN a transaction block in DB.
fo_dbManager * dbManager
fo_dbManager object
General utility functions for CPP.
std::vector< T > getSimpleResults(int columnN, T(functionP)(const char *)) const
Get vector of a single column from query result.
DbManager dbManager
DbManager to use.
PGresult * queryFileIdsForUpload(fo_dbManager *dbManager, int uploadId, bool ignoreFilesWithMimeType)
Get all file IDs (pfile_fk) for a given upload.
DB utility functions for agents.
AgentDatabaseHandler(DbManager dbManager)