Skip to content
Permalink
Browse files

More expression help

  • Loading branch information
m-kuhn committed Sep 20, 2015
1 parent 2a6cff4 commit 41a330f2717cad3bf41ace3f959a7b30d3ab2da2
@@ -0,0 +1,13 @@
<h3>* multiplication operator</h3>
<p>Multiplication of two values</p>
<p>If one of the values is NULL the result will be NULL.</p>

<h4>Syntax</h4>
<pre> value1 * value2 </pre>

<h4>Arguments</h4>
None

<h4>Examples</h4>
<pre> 5 * 4 &rarr; 20 </pre>
<pre> 5 * NULL &rarr; NULL </pre>
@@ -0,0 +1,13 @@
<h3>+ addition operator</h3>
<p>Addition of two values</p>
<p>If one of the values is NULL the result will be NULL.</p>

<h4>Syntax</h4>
<pre> value1 + value2 </pre>

<h4>Arguments</h4>
None

<h4>Examples</h4>
<pre> 5 + 4 &rarr; 9 </pre>
<pre> 5 + NULL &rarr; NULL </pre>
@@ -0,0 +1,13 @@
<h3>- subtract operator</h3>
<p>Subtraction of two values</p>
<p>If one of the values is NULL the result will be NULL.</p>

<h4>Syntax</h4>
<pre> value1 - value2 </pre>

<h4>Arguments</h4>
None

<h4>Examples</h4>
<pre> 5 - 4 &rarr; 1 </pre>
<pre> 5 - NULL &rarr; NULL </pre>
@@ -0,0 +1,13 @@
<h3>&lt; Less than operator</h3>
<p>Compares two values and evaluates to 1 if the left value is less than the right value</p>

<h4>Syntax</h4>
<pre> value1 &lt; value2 </pre>

<h4>Arguments</h4>
None

<h4>Examples</h4>
<pre> 5 &lt; 4 &rarr; 0 </pre>
<pre> 5 &lt; 5 &rarr; 0 </pre>
<pre> 4 &lt; 5 &rarr; 1 </pre>
@@ -0,0 +1,13 @@
<h3>&lt;= Less than or equal operator</h3>
<p>Compares two values and evaluates to 1 if the left value is less than or equal to the right value</p>

<h4>Syntax</h4>
<pre> value1 &lt;= value2 </pre>

<h4>Arguments</h4>
None

<h4>Examples</h4>
<pre> 5 &lt;= 4 &rarr; 0 </pre>
<pre> 5 &lt;= 5 &rarr; 1 </pre>
<pre> 4 &lt;= 5 &rarr; 1 </pre>
@@ -0,0 +1,14 @@
<h3>&lt;&gt; Unequal operator</h3>
<p>Compares two values and evaluates to 1 if they are not equal.</p>

<h4>Syntax</h4>
<pre> value1 &lt;&gt; value2 </pre>

<h4>Arguments</h4>
None

<h4>Examples</h4>
<pre> 5 &lt;&gt; 4 &rarr; 1 </pre>
<pre> 4 &lt;&gt; 4 &rarr; 0 </pre>
<pre> 5 &lt;&gt; NULL &rarr; NULL </pre>
<pre> NULL &lt;&gt; NULL &rarr; NULL </pre>
@@ -0,0 +1,13 @@
<h3>&gt; Greater than operator</h3>
<p>Compares two values and evaluates to 1 if the left value is greater than the right value</p>

<h4>Syntax</h4>
<pre> value1 &gt; value2 </pre>

<h4>Arguments</h4>
None

<h4>Examples</h4>
<pre> 5 &gt; 4 &rarr; 1 </pre>
<pre> 5 &gt; 5 &rarr; 0 </pre>
<pre> 4 &gt; 5 &rarr; 0 </pre>
@@ -0,0 +1,13 @@
<h3>&gt;= Greater or equal operator</h3>
<p>Compares two values and evaluates to 1 if the left value is greater than or equal to the right value</p>

<h4>Syntax</h4>
<pre> value1 &gt;= value2 </pre>

<h4>Arguments</h4>
None

<h4>Examples</h4>
<pre> 5 &gt;= 4 &rarr; 1 </pre>
<pre> 5 &gt;= 5 &rarr; 1 </pre>
<pre> 4 &gt;= 5 &rarr; 0 </pre>
@@ -428,18 +428,18 @@ void QgsExpressionBuilderWidget::updateFunctionTree()
mModel->clear();
mExpressionGroups.clear();
// TODO Can we move this stuff to QgsExpression, like the functions?
registerItem( "Operators", "+", " + ", tr( "Addition operator" ) );
registerItem( "Operators", "-", " - ", tr( "Subtraction operator" ) );
registerItem( "Operators", "*", " * ", tr( "Multiplication operator" ) );
registerItem( "Operators", "+", " + " );
registerItem( "Operators", "-", " - " );
registerItem( "Operators", "*", " * " );
registerItem( "Operators", "/", " / ", tr( "Division operator" ) );
registerItem( "Operators", "%", " % ", tr( "Modulo operator" ) );
registerItem( "Operators", "^", " ^ ", tr( "Power operator" ) );
registerItem( "Operators", "=", " = ", tr( "Equal operator" ) );
registerItem( "Operators", ">", " > ", tr( "Greater as operator" ) );
registerItem( "Operators", "<", " < ", tr( "Less than operator" ) );
registerItem( "Operators", ">", " > " );
registerItem( "Operators", "<", " < " );
registerItem( "Operators", "<>", " <> ", tr( "Unequal operator" ) );
registerItem( "Operators", "<=", " <= ", tr( "Less or equal operator" ) );
registerItem( "Operators", ">=", " >= ", tr( "Greater or equal operator" ) );
registerItem( "Operators", "<=", " <= " );
registerItem( "Operators", ">=", " >= " );
registerItem( "Operators", "||", " || " );
registerItem( "Operators", "IN", " IN " );
registerItem( "Operators", "LIKE", " LIKE " );

0 comments on commit 41a330f

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