Revision ac8aede7
Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt
src/entitymanager.h | ||
---|---|---|
#include <QtSql/QSqlField>
|
||
#include <QString>
|
||
#include <QStringList>
|
||
#include <QObject>
|
||
#include <QSharedPointer>
|
||
#include <QDebug>
|
||
#include "schema.h"
|
||
... | ... | |
|
||
namespace CuteEntityManager {
|
||
|
||
class EntityManager {
|
||
class EntityManager : public QObject {
|
||
Q_OBJECT
|
||
signals:
|
||
void actionFinished(qint64 id);
|
||
|
||
... | ... | |
const QString &sql) {
|
||
Entity *e = EntityInstanceFactory::createInstance<T>();
|
||
if (e) {
|
||
QSqlQuery q = this->schema.data()->getQueryBuilder().data()->getQuery();
|
||
q = this->db.data()->select(sql);
|
||
QSqlQuery q = this->db.data()->select(sql);
|
||
auto result = this->convertQueryResult(q);
|
||
auto ret = this->convert(result, e->getClassname());
|
||
delete e;
|
Auch abrufbar als: Unified diff
entitymanager inherits from qobject for acting as a worker object