21 QgsSQLiteExpressionCompiler::QgsSQLiteExpressionCompiler(
const QgsFields& fields )
32 switch ( static_cast<const QgsExpression::NodeBinaryOperator*>( node )->op() )
51 QString QgsSQLiteExpressionCompiler::quotedIdentifier(
const QString& identifier )
54 id.replace(
'\"',
"\"\"" );
55 return id.prepend(
'\"' ).append(
'\"' );
58 QString QgsSQLiteExpressionCompiler::quotedValue(
const QVariant& value,
bool& ok )
65 switch ( value.
type() )
68 case QVariant::LongLong:
69 case QVariant::Double:
74 return value.
toBool() ?
"1" :
"0";
77 case QVariant::String:
virtual NodeType nodeType() const =0
Abstract virtual that returns the type of this node.
QString & append(QChar ch)
QString & prepend(QChar ch)
Container of fields for a vector layer.
virtual QString result()
Returns the compiled expression string for use by the provider.
Generic expression compiler for translation to provider specific SQL WHERE clauses.
QString & replace(int position, int n, QChar after)
Result
Possible results from expression compilation.
virtual Result compileNode(const QgsExpression::Node *node, QString &str)
Compiles an expression node and returns the result of the compilation.