--- a/libidav/davqlparser.h Wed Apr 15 08:57:46 2015 +0200 +++ b/libidav/davqlparser.h Fri Apr 17 13:11:58 2015 +0200 @@ -82,7 +82,6 @@ davqlexprtype_t type; /** * Operator. - * */ davqloperator_t op; /** @@ -97,6 +96,20 @@ DavQLExpression *right; }; +/** + * A tuple representing an order criterion. + */ +typedef struct { + /** + * The column. + */ + DavQLExpression *column; + /** + * True, if the result shall be sorted ascending, false otherwise. + */ + _Bool ascending; +} DavQLOrderCriterion; + /** * Query statement object. @@ -203,6 +216,12 @@ */ DavQLExpression* where; /** + * The list of DavQLOrderCriterions. + * This is <code>NULL</code> for SET queries and may be <code>NULL</code> + * if the result doesn't need to be sorted. + */ + UcxList* orderby; + /** * The recursion depth for the statement. * Defaults to 1. */