16 #ifndef QGSSQLEXPRESSIONCOMPILER_H 17 #define QGSSQLEXPRESSIONCOMPILER_H 21 #include "qgis_core.h" 25 class QgsExpressionNode;
57 CaseInsensitiveStringMatch = 1,
58 LikeIsCaseInsensitive = 1 << 1,
59 NoNullInBooleanLogic = 1 << 2,
60 NoUnaryMinus = 1 << 3,
61 IntegerDivisionResultsInInteger = 1 << 4,
63 Q_DECLARE_FLAGS( Flags,
Flag )
76 virtual Result compile(
const QgsExpression *exp );
81 virtual QString result();
91 virtual QString quotedIdentifier(
const QString &identifier );
100 virtual QString quotedValue(
const QVariant &value,
bool &ok );
108 virtual Result compileNode(
const QgsExpressionNode *node, QString &str );
116 virtual QString sqlFunctionFromFunctionName(
const QString &fnName )
const;
125 virtual QStringList sqlArgumentsFromFunctionName(
const QString &fnName,
const QStringList &fnArgs )
const;
133 virtual QString castToReal(
const QString &value )
const;
140 virtual QString castToInt(
const QString &value )
const;
149 bool nodeIsNullLiteral(
const QgsExpressionNode *node )
const;
153 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsSqlExpressionCompiler::Flags )
155 #endif // QGSSQLEXPRESSIONCOMPILER_H Container of fields for a vector layer.
Flag
Enumeration of flags for how provider handles SQL clauses.
Generic expression compiler for translation to provider specific SQL WHERE clauses.
Result
Possible results from expression compilation.
Expression was partially compiled, but provider will return extra records and results must be double-...
Expression was successfully compiled and can be completely delegated to provider. ...