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