Skip to content

Commit

Permalink
Merge pull request #191 from noi-techpark/issue-182-strings-where-clause
Browse files Browse the repository at this point in the history
add explanation about quoted numeric values
  • Loading branch information
bertolla committed Dec 7, 2020
2 parents 059ff40 + f1590bd commit afb79dd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion source/howto/mobility/getstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@ the following limitations:
The :literal:`WHERE` Clause
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2020.12 explanation about string values in WHERE clauses

The :literal:`WHERE` clause can be used to define conditions to filter
out unwanted results and can be built with the use of the following
operators:
Expand Down Expand Up @@ -593,7 +595,14 @@ of values, respectively:
* :literal:`where=smetadata.capacity.gt.100` returns only parking lots with more
than 100 parking spaces
* :literal:`where=smetadata.capacity.gt.100,smetadata.municipality.eq."Bolzano -
Bozen"` same as previous query, but only parking lots in Bolzano are shown.
Bozen"` same as previous query, but only parking lots in Bolzano are
shown.

In these two examples we use a number in the filter (i.e., gt.\
:strong:`100`), which is by default automatically recognised as a
number and the required math is calculated out of the box. In case
there is a query in which you use a number, but need to consider is as
a string, you need to use double quotes, like gt.\ :strong:`"100"`.

.. _logical-operators:

Expand Down

0 comments on commit afb79dd

Please sign in to comment.