| 117 | sorting (Conformance level 1-2) :: |
| 118 | |
| 119 | A dedicated context-set defines the sort-clause: sortBy, to be used at the end of a cql query: |
| 120 | |
| 121 | {{{"dinosaur" sortBy dc.date/sort.descending dc.title/sort.ascending}}} |
| 122 | |
| 123 | |
| 124 | named queries (Conformance level 2) :: |
| 125 | The server can provide a unique identifier for a result set by means of header element: <resultSetId>. This id can be used in subsequent requests to reference the result using the index: cql.resultSetId, allowing referencing the result set within a query. Thus after receiving two result sets (with the ids a and b) one could request an intersection of those two via: |
| 126 | {{{ |
| 127 | cql.resultSetId = "a" AND cql.resultSetId = "b" |
| 128 | }}} |
| 129 | or continue restricting the result with: |
| 130 | {{{ |
| 131 | cql.resultSetId = "a" AND dc.title=cat |
| 132 | }}} |
| 133 | Along with <resultSetId> server may supply <resultSetIdleTime> - a good-faith estimate that the result set will remain available and unchanged (both in content and order). |