# HG changeset patch # User Mike Becker # Date 1427122125 -3600 # Node ID c80bde9c539045cfc97f58eb797d1f74f805fd1b # Parent 4c48ce3b9045106f976b97e01d7a7700c758c8be added missing stuff to davql types diff -r 4c48ce3b9045 -r c80bde9c5390 libidav/davqlparser.h --- a/libidav/davqlparser.h Mon Mar 23 14:29:30 2015 +0100 +++ b/libidav/davqlparser.h Mon Mar 23 15:48:45 2015 +0100 @@ -44,7 +44,10 @@ /** * Enumeration of possible expression types. */ -typedef enum {LITERAL, UNARY, BINARY, LOGICAL} davqlexprtype_t; +typedef enum { + LITERAL, IDENTIFIER, + UNARY, BINARY, LOGICAL, FUNCCALL +} davqlexprtype_t; /** * Enumeration of possible expression operators. @@ -52,7 +55,8 @@ typedef enum { ADD, SUB, MUL, DIV, AND, OR, XOR, NEG, - NOT, LAND, LOR + NOT, LAND, LOR, + EQ, NEQ, LT, GT, LE, GE } davqloperator_t; /** @@ -80,12 +84,12 @@ davqloperator_t op; /** * Left or single operand. - * NULL for literals. + * NULL for literals or identifiers. */ DavQLExpression *expr1; /** * Right operand. - * NULL for literals or unary expressions. + * NULL for literals, identifiers or unary expressions. */ DavQLExpression *expr2; }; @@ -94,6 +98,15 @@ /** * Query statement object. * Contains the binary information about the parsed query. + * + * The grammar for a DavQLStatement is: + * + * GET: + * document it so + * + * PUT: + * make it so + * */ typedef struct { /** @@ -105,10 +118,15 @@ */ davqltype_t type; /** - * The list of field names (sstr_t). + * The list of field expressions. * * This may be NULL for GET queries, to request all properties. */ @@ -119,7 +137,12 @@ */ UcxList* putvalues; /** + * A DavQLExpression that denotes the queried path. + */ + DavQLExpression from; + /** * Logical expression for selection. + * NULL, if there is no where clause. */ DavQLExpression* where; /**