21 #ifndef _SWQ_H_INCLUDED_ 22 #define _SWQ_H_INCLUDED_ 28 #if defined(_WIN32) && !defined(_WIN32_WCE) 29 # define strcasecmp stricmp 30 #elif defined(_WIN32_WCE) 31 # define strcasecmp _stricmp 92 void *record_handle );
95 typedef swq_field_type (*swq_op_checker)(
swq_expr_node *op );
98 static void Quote(
CPLString &,
char chQuote =
'\'' );
112 void Dump( FILE *fp,
int depth );
113 swq_field_type Check(
swq_field_list *,
int bAllowFieldsInSecondaryTables );
117 swq_node_type eNodeType;
118 swq_field_type field_type;
122 void ReverseSubExpressions();
142 swq_op_evaluator pfnEvaluator;
143 swq_op_checker pfnChecker;
149 static const swq_operation *GetOperator( swq_op eOperation );
162 swq_field_type *types;
175 const char *pszInput;
177 const char *pszLastValid;
192 int swq_identify_field(
const char *token,
swq_field_list *field_list,
193 swq_field_type *this_type,
int *table_id );
195 CPLErr swq_expr_compile(
const char *where_clause,
198 swq_field_type *field_types,
201 CPLErr swq_expr_compile2(
const char *where_clause,
208 int swq_test_like(
const char *input,
const char *pattern );
214 const char* SWQFieldTypeToString( swq_field_type field_type );
218 #define SWQP_ALLOW_UNDEFINED_COL_FUNCS 0x01 220 #define SWQM_SUMMARY_RECORD 1 221 #define SWQM_RECORDSET 2 222 #define SWQM_DISTINCT_LIST 3 229 SWQCF_COUNT = SWQ_COUNT,
235 swq_col_func col_func;
240 swq_field_type field_type;
241 swq_field_type target_type;
253 char **distinct_list;
271 char *primary_field_name;
276 char *secondary_field_name;
290 int PushField(
swq_expr_node *poExpr,
const char *pszAlias=NULL,
291 int distinct_flag = FALSE );
296 int PushTableDef(
const char *pszDataSource,
297 const char *pszTableName,
298 const char *pszAlias );
302 void PushJoin(
int iSecondaryTable,
303 const char *pszPrimaryField,
304 const char *pszSecondaryField );
310 void PushOrderBy(
const char *pszFieldName,
int bAscending );
315 void PushUnionAll(
swq_select* poOtherSelectIn );
317 CPLErr preparse(
const char *select_statement );
325 CPLErr swq_select_parse(
swq_select *select_info,
329 const char *swq_select_finish_summarize(
swq_select *select_info );
330 const char *swq_select_summarize(
swq_select *select_info,
334 int swq_is_reserved_keyword(
const char* pszStr);
Convenient string class based on std::string.
Definition: cpl_string.h:226
OGRwkbGeometryType
Definition: ogr_core.h:308
Definition: ogr_geometry.h:79