clearquestoslc

Nested conditions in where clause of OSLC


Are nested conditions possible in WHERE clause of OSLC?

Ex : oslc.where=(name="James" and age>25 and (operatingStatus=null or operatingStatus="Active") )

If not, what is the way to extract using such nested WHERE condition? Am new to OSLC. Any help will be extremely useful.


Solution

  • No, if you look at https://open-services.net/bin/view/Main/OSLCCoreSpecQuery#oslc_where under the Syntax section:

    oslc_where    ::= "oslc.where=" compound_term
    compound_term ::= simple_term (space? boolean_op space? simple_term)*
    simple_term   ::= term | scoped_term
    

    As you can see, compound_term does not allow further compound terms. You should use SPARQL queries for more advanced scenarios such as yours.