1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#ifndef SQLITEWITH_H
#define SQLITEWITH_H
#include "sqlitestatement.h"
#include "sqliteindexedcolumn.h"
class SqliteSelect;
class API_EXPORT SqliteWith : public SqliteStatement
{
Q_OBJECT
public:
class API_EXPORT CommonTableExpression : public SqliteStatement
{
public:
enum AsMode {
ANY,
MATERIALIZED,
NOT_MATERIALIZED
};
CommonTableExpression();
CommonTableExpression(const CommonTableExpression& other);
CommonTableExpression(const QString& tableName, const QList<SqliteIndexedColumn*>& indexedColumns, SqliteSelect* select,
AsMode asMode);
SqliteStatement* clone();
QString table;
QList<SqliteIndexedColumn*> indexedColumns;
SqliteSelect* select = nullptr;
AsMode asMode = ANY;
protected:
TokenList rebuildTokensFromContents();
};
SqliteWith();
SqliteWith(const SqliteWith& other);
SqliteWith(const QList<CommonTableExpression*>& cteList);
SqliteStatement* clone();
QList<CommonTableExpression*> cteList;
bool recursive = false;
protected:
TokenList rebuildTokensFromContents();
};
typedef QSharedPointer<SqliteWith> SqliteWithPtr;
#endif // SQLITEWITH_H
|