[Qgis-user] New Labeling: conditional labels

Nathan Woodrow madmanwoo at gmail.com
Fri Jan 6 17:09:54 PST 2012


Love your work Martin!

I'll add syntax highlighting for it tonight/tomorrow sometime.

- Nathan

On Sat, Jan 7, 2012 at 10:31 AM, Martin Dobias <wonder.sk at gmail.com> wrote:

> On Fri, Jan 6, 2012 at 1:25 PM, Martin Dobias <wonder.sk at gmail.com> wrote:
> > SQL recognizes CASE statement with following alternate syntax:
> >
> > 1. "if" equivalent:
> > CASE
> >  WHEN x > 10 THEN 'big' ELSE 'small'
> > END
>
> Just pushed a commit implementing that.
>
> The syntax is:
> CASE WHEN cond1 THEN exp1 [WHEN cond2 THEN exp2]* [ELSE exp3] END
>
> There may be one or more WHEN/THEN clauses. If no condition matches,
> the expression from "ELSE" is evaluated - if none is specified then
> NULL is returned.
>
> Note: the other syntax with "base" expression (CASE x WHEN y THEN z
> ... END) is not supported yet.
>
> Have fun!
> Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20120107/4d9af130/attachment.html>


More information about the Qgis-user mailing list