2 * Window Search Service
4 * Copyright (c) Noel Power
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 #include "librpc/gen_ndr/wsp.h"
45 * not sure we can express the above in the grammar without
46 * some custom operator :/
89 struct restr
*restr_tree
;
90 struct value_range
*value_range
;
96 t_value_holder
*lower
;
97 t_value_holder
*upper
;
99 typedef struct basic_restr
103 t_value_holder
*values
;
106 typedef struct basic_query
109 const struct full_propset_info
*prop_info
;
111 t_basic_restr
*basic_restriction
;
114 t_basic_query
*create_basic_query(TALLOC_CTX
*ctx
, const char *prop
, t_basic_restr
*restr
);
121 t_basic_restr
*basic_restr
;
124 t_restr
*create_restr(TALLOC_CTX
*ctx
, t_nodetype op
, t_restr
*left
, t_restr
*right
, t_basic_restr
*value
);
126 t_basic_restr
*create_basic_restr(TALLOC_CTX
*ctx
,
129 t_value_holder
*values
);
136 struct wsp_crestriction
*restriction
;
139 t_query
*create_query_node(TALLOC_CTX
*ctx
, t_nodetype op
, t_query
*left
, t_query
*right
, t_basic_query
*value
);
142 typedef struct col_list
{
147 typedef struct select_stmt
{
152 t_col_list
*create_cols(TALLOC_CTX
*ctx
, const char *col
, t_col_list
*append_list
);
153 t_select_stmt
*create_select(TALLOC_CTX
*ctx
, t_col_list
*cols
, t_query
*where
);
155 t_select_stmt
*get_wsp_sql_tree(const char *expr
);
156 t_value_holder
*create_string_val(TALLOC_CTX
*, const char *text
);
157 t_value_holder
*create_num_val(TALLOC_CTX
*, int64_t val
);
158 t_value_holder
*create_bool_val(TALLOC_CTX
*, bool val
);
159 t_value_holder
*create_value_range(TALLOC_CTX
*,
160 t_value_holder
*left
,
161 t_value_holder
*right
);
162 t_value_holder
*create_date_range_shortcut(TALLOC_CTX
*ctx
,
163 daterange_type daterange
);
164 t_value_holder
*create_size_range_shortcut(TALLOC_CTX
*ctx
,
165 sizerange_type size
);
166 #endif /* __WSP_AQS_H__ */