18.01.2015 Views

Content Management Interoperability Services (CMIS) Version 1.1

Content Management Interoperability Services (CMIS) Version 1.1

Content Management Interoperability Services (CMIS) Version 1.1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example:<br />

SELECT Y.CLAIM_NUM, X.PROPERTY_ADDRESS, Y.DAMAGE_ESTIMATES, Z.BAND<br />

FROM ( POLICY AS X JOIN CLAIMS AS Y ON X.POLICY_NUM = Y.POLICY_NUM )<br />

JOIN RISK AS Z ON X.cmis:objectId = Z.cmis:objectId<br />

WHERE ( 100000 = ANY Y.DAMAGE_ESTIMATES ) AND Z.BAND > 3<br />

(Note: DAMAGE_ESTIMATES is a multi-valued Integer property and RISK is a secondary type.)<br />

IN/ANY Predicate<br />

<strong>CMIS</strong>-SQL exposes a new IN predicate defined for a multi-valued property. It is modeled after the SQL-92<br />

IN predicate, but since the entire predicate is different semantically, it has its own production rule in the BNF<br />

grammar.<br />

The quantifier is restricted to ANY. The predicate MUST be evaluated to TRUE if at least one of the property's<br />

values is (or, is not, if NOT is specified) among the given list of literal values. Otherwise the predicate is<br />

evaluated to FALSE.<br />

The ANY operation argument MUST be one of the properties found in the comparison list above which supports<br />

IN operations.<br />

Example 1:<br />

SELECT *<br />

FROM CAR_REVIEW<br />

WHERE (MAKE = 'buick') OR<br />

(ANY FEATURES IN ('NAVIGATION SYSTEM', 'SATELLITE RADIO', 'MP3'))<br />

(Note: FEATURES is a multi-valued String property.)<br />

Example 2:<br />

SELECT d.cmis:objectId, d.cmis:name, a.SPECIES<br />

FROM cmis:document AS d JOIN ANIMAL AS a ON d.cmis:objectId = a.cmis:objectId<br />

WHERE ANY a.SPECIES IN ('dog', 'cat')<br />

(Note: ANIMAL is a secondary type and ANIMAL.SPECIES is a multi-valued String property.)<br />

2.<strong>1.1</strong>4.2.4.4 CONTAINS() predicate function (<strong>CMIS</strong>-SQL Extension)<br />

BNF grammar structure: CONTAINS ( [ ,] ' ' )<br />

<strong>CMIS</strong>-v<strong>1.1</strong>-csprd01<br />

Standards Track Work Product<br />

Copyright © OASIS Open 2012. All Rights Reserved.<br />

18 August 2012<br />

Page 108 of 331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!