Revision 3160499c
Von Christian Ehringfeld vor mehr als 8 Jahren hinzugefügt
src/query.h | ||
---|---|---|
#include <QVariant>
|
||
#include <QLinkedList>
|
||
#include "join.h"
|
||
#include "expression.h"
|
||
|
||
namespace CuteEntityManager {
|
||
class Condition;
|
||
class OrderBy;
|
||
enum class Direction;
|
||
class Query {
|
||
public:
|
||
Query();
|
||
QStringList getSelect() const;
|
||
void setSelect(const QStringList &value);
|
||
|
||
QString getSelectOption() const;
|
||
void setSelectOption(const QString &value);
|
||
... | ... | |
QStringList getFrom() const;
|
||
void setFrom(const QStringList &value);
|
||
|
||
QStringList getGroupBy() const;
|
||
void setGroupBy(const QStringList &value);
|
||
|
||
QStringList getOrderBy() const;
|
||
void setOrderBy(const QStringList &value);
|
||
|
||
QList<Join> getJoins() const;
|
||
void setJoins(const QList<Join> &value);
|
||
|
||
... | ... | |
uint getOffset() const;
|
||
void setOffset(const uint &value);
|
||
|
||
void appendCondition(const QString &condition);
|
||
void appendCondition(const Condition &condition);
|
||
QLinkedList<Condition> getConditions() const;
|
||
void setConditions(const QLinkedList<Condition> &value);
|
||
void appendWhereCondition(const QString &condition);
|
||
void appendWhereCondition(const Condition &condition);
|
||
|
||
void appendHavingCondition(const QString &condition);
|
||
void appendHavingCondition(const Condition &condition);
|
||
|
||
QList<Condition> getWhere() const;
|
||
void setWhere(const QList<Condition> &value);
|
||
|
||
QList<Condition> getHaving() const;
|
||
void setHaving(const QList<Condition> &value);
|
||
|
||
void appendOrderBy(const OrderBy &orderBy);
|
||
void appendOrderBy(const QString &column, const Direction &direction);
|
||
QList<OrderBy> getOrderBy() const;
|
||
void setOrderBy(const QList<OrderBy> &value);
|
||
|
||
QStringList getGroupBy() const;
|
||
void setGroupBy(const QStringList &value);
|
||
|
||
QList<Expression> getSelect() const;
|
||
void appendSelect(const Expression &value);
|
||
void appendSelect(const QString &value);
|
||
void setSelect(const QList<Expression> &value);
|
||
void setSelect(const QStringList &value);
|
||
|
||
private:
|
||
QStringList select;
|
||
private:
|
||
QList<Expression> select;
|
||
QString selectOption = QStringLiteral("");
|
||
bool distinct = false;
|
||
QStringList from;
|
||
QStringList groupBy;
|
||
QStringList orderBy;
|
||
QLinkedList<Condition> conditions;
|
||
QList<OrderBy> orderBy;
|
||
QList<Condition> where;
|
||
QList<Condition> having;
|
||
QList<Join> joins;
|
||
QHash<QString, QVariant> params;
|
||
uint limit = 0;
|
Auch abrufbar als: Unified diff
queryinterpreter/builder wip