cQuery
cQuery combines cPath and cQL into one query where cQL clauses are contained in curly brackets.
Example
/Images//[:Image AND Width>640]{SELECT OID, Title ORDER BY Width}
Where to use cQuery
cQuery can be used throughout webCOMAND to access and select folders and content.
- Navigation Bar - Use the "Edit Path" option in Content Manager (CMS) and other apps.
- API App - Query content from cQuery tabs.
- cScript - Query content from functions including: cpath, list, context and insert.
- cTemplate - Query content from directives including: #CPATH, #LIST, #CONTEXT and #INSERT.
- Get Web Service - The query parameter.
cQuery Values & Methods
In the future, cQuery's cPath features will be extended to:
- resolve data type field values (not just objects and collections)
- call and chain object methods within the expression
These features will not be available until webCOMAND v4.0.
Example
The following cQuery will resize all images in the Images folder greater than 640 pixels wide to 640 pixels wide, and then save them back to the repository.
/Images//[:Image AND Width>640].Resize(640,0).save()