Data_deduplication_service
Service that will use hashes to deduplicate files
|
Basic class for database pqxx::result representation. More...
#include <myPqxxModel.h>
Public Member Functions | |
bool | performConnection (myConnString &cstring) |
bool | checkConnection () |
virtual void | getData ()=0 |
bool | isEmpty () const |
template<typename ResType1 , typename... Args> | |
void | executeInTransaction (ResType1(*call)(db_services::trasnactionType &, Args...), Args &&... args) |
template<typename ResType1 , typename... Args> | |
void | executeInTransaction (const std::function< ResType1(trasnactionType &, Args...)> &call, Args &&... args) |
Protected Member Functions | |
QVariant | convertFromPqxx (const QModelIndex &index, int role) const |
Returns properly casted data Uses postgres column OID to perform cast to suitable type that will be wrapped in QVariant. More... | |
template<typename ResType1 , typename ... Args> | |
void | executeInTransaction (ResType1(*call)(db_services::trasnactionType &, Args ...), Args &&... args) |
template<typename ResType1 , typename ... Args> | |
void | executeInTransaction (const std::function< ResType1(db_services::trasnactionType &, Args ...)> &call, Args &&... args) |
void | setColumnsTypes () |
void | reset () |
Protected Attributes | |
resType | res |
conPtr | connection |
QList< oid > | columnTypes |
QList< QString > | columnNames |
bool | good |
bool | isEmpty_ |
Basic class for database pqxx::result representation.
bool models::myPxxxModelBase::checkConnection | ( | ) |
Checks connection status
|
protected |
Returns properly casted data Uses postgres column OID to perform cast to suitable type that will be wrapped in QVariant.
This function is used in order for elements in inheriting models
to be able to get native data type for better sorting etc.
index | |
role |
|
protected |
db_services::executeInTransaction(conPtr &conn_, ResultType (*call)(trasnactionType &, Args ...), Args &&... args) "executeInTransaction()"
ResType1 | |
Args |
call | |
args |
void models::myPxxxModelBase::executeInTransaction | ( | const std::function< ResType1(trasnactionType &, Args...)> & | call, |
Args &&... | args | ||
) |
|
protected |
void models::myPxxxModelBase::executeInTransaction | ( | ResType1(*)(db_services::trasnactionType &, Args...) | call, |
Args &&... | args | ||
) |
|
pure virtual |
Implemented in models::deduplicationCharacteristicsModel.
|
inline |
Checks models emptiness
bool models::myPxxxModelBase::performConnection | ( | myConnString & | cstring | ) |
Connects to database using given connection string
cstring |
|
inlineprotected |
Resets result
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |