diff -r f82cb65a78ec -r 237844f263b4 libidav/davqlparser.h --- a/libidav/davqlparser.h Fri Apr 17 16:26:53 2015 +0200 +++ b/libidav/davqlparser.h Tue Apr 21 12:13:41 2015 +0200 @@ -46,6 +46,7 @@ * Enumeration of possible expression types. */ typedef enum { + DAVQL_UNDEFINED_TYP, DAVQL_NUMBER, DAVQL_STRING, DAVQL_TIMESTAMP, DAVQL_IDENTIFIER, DAVQL_UNARY, DAVQL_BINARY, DAVQL_LOGICAL, DAVQL_FUNCCALL } davqlexprtype_t; @@ -111,6 +112,27 @@ _Bool descending; } DavQLOrderCriterion; +/** + * A tuple representing a field. + */ +typedef struct { + /** + * The field name. + * + */ + sstr_t name; + /** + * The field expression. + * + */ + DavQLExpression *expr; +} DavQLField; /** * Query statement object. @@ -145,11 +167,11 @@ * LogicalOperator = " and " | " or " | " xor "; * Comparison = | "=" | "<" | ">" | "<=" | ">=" | "!="; * - * FieldExpressions = "*", {",", Expression, " as ", String} + * FieldExpressions = "*", {",", Expression, " as ", Identifier} * | FieldExpression, {",", FieldExpression} * | "-"; * FieldExpression = Identifier - * | Expression, " as ", String; + * | Expression, " as ", Identifier; * SetExpressions = SetExpression, {",", SetExpressions}; * SetExpression = Identifier, "=", Expression; * @@ -204,15 +226,10 @@ */ char* errormessage; /** - * The list of field expressions. + * The list of DavQLFields. */ UcxList* fields; /** - * The list of DavQLExpressions for the new DAV property values. - * This is NULL for GET queries. - */ - UcxList* setvalues; - /** * A string that denotes the queried path. */ sstr_t path;