Skip to content
Permalink
Browse files

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 ea6c0446eb9b3e0881afa5e8d0e255bff0288a8a
Showing with 3 additions and 3 deletions.
  1. +2 −1 resources/function_help/json/CASE
  2. +1 −2 resources/function_help/json/age
@@ -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"}
]
}
@@ -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.
You can’t perform that action at this time.