Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Apply suggestions from code review
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
  • Loading branch information
2 people authored and nyalldawson committed Jul 21, 2020
1 parent ce5a643 commit ea6c044
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion resources/function_help/json/CASE
Expand Up @@ -9,6 +9,7 @@
{"arg":"ELSE result","description":"If none of the above conditions evaluated to True then <i>result</i> is evaluated and returned."}
],
"examples": [
{ "expression":"CASE WHEN \"column\" IS NULL THEN 'None' END", "returns":" Returns the string 'none' if the \"column\" field is NULL"}
{ "expression":"CASE WHEN \"name\" IS NULL THEN 'None' END", "returns":" Returns the string 'none' if the \"name\" field is NULL"},
{ "expression":"CASE WHEN $area > 10000 THEN 'Big property' WHEN $area > 5000 THEN 'Medium property' ELSE 'Small property' END", "returns":" Returns the string 'Big property' if the area is bigger than 10000, 'Medium property' if the area is between 5000 and 10000, and 'Small property' for others"}
]
}
3 changes: 1 addition & 2 deletions resources/function_help/json/age
Expand Up @@ -2,10 +2,9 @@
"name": "age",
"type": "function",
"groups": ["Date and Time"],
"description": "Returns the difference between two dates or datetimes.<br>The difference is returned as a <code>Interval</code> and needs to be used with one of the following functions in order to extract useful information:<br /><ul><li><code>year</code></li><li><code>month</code></li><li><code>week</code></li><li><code>day</code></li><li><code>hour</code></li><li><code>minute</code></li><li><code>second</code></ul>",
"description": "Returns the difference between two dates or datetimes.<br>The difference is returned as an <code>Interval</code> and needs to be used with one of the following functions in order to extract useful information:<br /><ul><li><code>year</code></li><li><code>month</code></li><li><code>week</code></li><li><code>day</code></li><li><code>hour</code></li><li><code>minute</code></li><li><code>second</code></ul>",
"arguments": [ {"arg":"datetime1","description":"a string, date or datetime representing the later date"},
{"arg":"datetime2","description":"a string, date or datetime representing the earlier date"}],
"examples": [ { "expression":"day(age('2012-05-12','2012-05-02'))", "returns":"10"},
{ "expression":"hour(age('2012-05-12','2012-05-02'))", "returns":"240"} ]
}

0 comments on commit ea6c044

Please sign in to comment.