Data_deduplication_service
Service that will use hashes to deduplicate files
models::myPqxxModel Class Reference

Table model for pqxx::result. More...

#include <myPqxxModel.h>

+ Inheritance diagram for models::myPqxxModel:
+ Collaboration diagram for models::myPqxxModel:

Public Member Functions

 myPqxxModel (QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent) const override
 
int columnCount (const QModelIndex &parent) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
void Reset ()
 
- Public Member Functions inherited from models::myPxxxModelBase
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)
 

Additional Inherited Members

- Protected Member Functions inherited from models::myPxxxModelBase
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 inherited from models::myPxxxModelBase
resType res
 
conPtr connection
 
QList< oidcolumnTypes
 
QList< QString > columnNames
 
bool good
 
bool isEmpty_
 

Detailed Description

Table model for pqxx::result.

See also
models::MyPxxxModelBase

Constructor & Destructor Documentation

◆ myPqxxModel()

models::myPqxxModel::myPqxxModel ( QObject *  parent = nullptr)
explicit

Member Function Documentation

◆ columnCount()

int models::myPqxxModel::columnCount ( const QModelIndex &  parent) const
inlineoverride

◆ data()

QVariant models::myPqxxModel::data ( const QModelIndex &  index,
int  role 
) const
override
+ Here is the call graph for this function:

◆ headerData()

QVariant models::myPqxxModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const
override

Shows headers

Parameters
section
orientation
role
Returns

◆ Reset()

void models::myPqxxModel::Reset ( )

Resets result and updates model

+ Here is the call graph for this function:

◆ rowCount()

int models::myPqxxModel::rowCount ( const QModelIndex &  parent) const
inlineoverride

The documentation for this class was generated from the following files: