tests/laqrs/syntax/if1.rq
raw| 1 | # IF(expr_cond, expr_true, expr_false) evaluates expr_cond and if |
| 2 | # true returns expr1, otherwise expr2. |
| 3 | # AKA C ternary operation |
| 4 | # result = expr_cond ? expr_true : expr_false |
| 5 | |
| 6 | PREFIX ex: <http://example.org/dt#> |
| 7 | |
| 8 | SELECT ?c |
| 9 | WHERE { |
| 10 | ?a ?b ?c |
| 11 | FILTER ( IF("10" = "10", ex:true, ex:false) = ex:true) |
| 12 | } |