2021:CMISQL Query

From Grooper Wiki
Revision as of 09:58, 31 May 2022 by Dgreenwood (talk | contribs)

CMIS Queries are utilized to search documents in CMIS Repositories and to filter documents upon import when using the Import Query Results provider.

Also called a "CMISQL query", the querying language CMIS Queries use is based on a subset of the SQL-92 grammar. Where SQL is a querying language to search and select data in a database, "CMISQL" is a querying language to search and select documents (and their metadata properties) in a storage location, represented by a CMIS Repository in Grooper.

About

CMIS Queries use clauses to retrieve content from a CMIS Repositories based on certain metadata property values, much like a SQL query uses clauses to retrieve data from a database based on column values. In both cases, a SELECT clause is used to select content based on certain conditions determined by a WHERE clause

In general the CMISQL statement takes the following form:

SELECT * FROM <Object Type>

WHERE <Conditions>

ORDER BY <Sort Criteria>

For example, if you wanted to retrieve all email messages in your Inbox folder over an Exchange CMIS Connection from a particular sender and order results by the date you received the email (oldest first), you could use the following query:

SELECT * FROM Message

WHERE (Sender LIKE '%user@example.com' AND IN_FOLDER('/Inbox'))

ORDER BY DateTimeReceived ASC