Skip to content
Permalink
Browse files

Bracket ops to avoid precedence issues when compiling expressions

  • Loading branch information
nyalldawson committed Nov 18, 2015
1 parent 9157173 commit 26b3685757923e80631dd13bf8c47f6bfc3dda30
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgssqlexpressioncompiler.cpp
@@ -219,7 +219,7 @@ QgsSqlExpressionCompiler::Result QgsSqlExpressionCompiler::compileNode( const Qg
if ( failOnPartialNode && ( lr == Partial || rr == Partial ) )
return Fail;

result = left + ' ' + op + ' ' + right;
result = '(' + left + ' ' + op + ' ' + right + ')';
if ( lr == Complete && rr == Complete )
return ( partialCompilation ? Partial : Complete );
else if (( lr == Partial && rr == Complete ) || ( lr == Complete && rr == Partial ) || ( lr == Partial && rr == Partial ) )

0 comments on commit 26b3685

Please sign in to comment.
You can’t perform that action at this time.