1 #pragma once
2 
3 #include <postgres.h>
4 
5 #include <groonga.h>
6 
7 typedef struct PGrnSearchData
8 {
9 	Relation index;
10 	grn_obj *sourcesTable;
11 	grn_obj targetColumns;
12 	grn_obj matchTargets;
13 	grn_obj sectionID;
14 	grn_obj *expression;
15 	grn_obj *expressionVariable;
16 	bool    isEmptyCondition;
17 	size_t  nExpressions;
18 } PGrnSearchData;
19 
20 void PGrnSearchBuildConditionQuery(PGrnSearchData *data,
21 								   grn_obj *targetColumn,
22 								   const char *query,
23 								   unsigned int querySize);
24 
25 void PGrnSearchBuildConditionBinaryOperation(PGrnSearchData *data,
26 											 grn_obj *targetColumn,
27 											 grn_obj *value,
28 											 grn_operator operator);
29