libidav/davqlparser.h

changeset 95
8ed7d8df6427
parent 92
e073cf4afc6a
child 96
896022673e0e
equal deleted inserted replaced
94:8822f7c08843 95:8ed7d8df6427
80 * The expression type. 80 * The expression type.
81 */ 81 */
82 davqlexprtype_t type; 82 davqlexprtype_t type;
83 /** 83 /**
84 * Operator. 84 * Operator.
85 *
86 */ 85 */
87 davqloperator_t op; 86 davqloperator_t op;
88 /** 87 /**
89 * Left or single operand. 88 * Left or single operand.
90 * <code>NULL</code> for literals or identifiers. 89 * <code>NULL</code> for literals or identifiers.
94 * Right operand. 93 * Right operand.
95 * <code>NULL</code> for literals, identifiers or unary expressions. 94 * <code>NULL</code> for literals, identifiers or unary expressions.
96 */ 95 */
97 DavQLExpression *right; 96 DavQLExpression *right;
98 }; 97 };
98
99 /**
100 * A tuple representing an order criterion.
101 */
102 typedef struct {
103 /**
104 * The column.
105 */
106 DavQLExpression *column;
107 /**
108 * True, if the result shall be sorted ascending, false otherwise.
109 */
110 _Bool ascending;
111 } DavQLOrderCriterion;
99 112
100 113
101 /** 114 /**
102 * Query statement object. 115 * Query statement object.
103 * Contains the binary information about the parsed query. 116 * Contains the binary information about the parsed query.
201 * Logical expression for selection. 214 * Logical expression for selection.
202 * <code>NULL</code>, if there is no where clause. 215 * <code>NULL</code>, if there is no where clause.
203 */ 216 */
204 DavQLExpression* where; 217 DavQLExpression* where;
205 /** 218 /**
219 * The list of DavQLOrderCriterions.
220 * This is <code>NULL</code> for SET queries and may be <code>NULL</code>
221 * if the result doesn't need to be sorted.
222 */
223 UcxList* orderby;
224 /**
206 * The recursion depth for the statement. 225 * The recursion depth for the statement.
207 * Defaults to 1. 226 * Defaults to 1.
208 */ 227 */
209 int depth; 228 int depth;
210 } DavQLStatement; 229 } DavQLStatement;

mercurial