7
7
#include "miscadmin.h"
8
8
#include "jsquery.h"
9
9
10
- static ExtractedNode * recursiveExtract (JsQueryItemR * jsq , bool indirect , PathItem * path );
10
+ static ExtractedNode * recursiveExtract (JsQueryItem * jsq , bool indirect , PathItem * path );
11
11
static int coundChildren (ExtractedNode * node , ExtractedNodeType type , bool first , bool * found );
12
12
static void fillChildren (ExtractedNode * node , ExtractedNodeType type , bool first , ExtractedNode * * items , int * i );
13
13
static void flatternTree (ExtractedNode * node );
@@ -16,14 +16,14 @@ static ExtractedNode *makeEntries(ExtractedNode *node, MakeEntryHandler handler,
16
16
static int compareNodes (const void * a1 , const void * a2 );
17
17
static void processGroup (ExtractedNode * node , int start , int end );
18
18
static void simplifyRecursive (ExtractedNode * node );
19
- static int compareJsQueryItemR ( JsQueryItemR * v1 , JsQueryItemR * v2 );
19
+ static int compareJsQueryItem ( JsQueryItem * v1 , JsQueryItem * v2 );
20
20
21
21
static ExtractedNode *
22
- recursiveExtract (JsQueryItemR * jsq , bool indirect , PathItem * path )
22
+ recursiveExtract (JsQueryItem * jsq , bool indirect , PathItem * path )
23
23
{
24
24
ExtractedNode * leftNode , * rightNode , * result ;
25
25
PathItem * pathItem ;
26
- JsQueryItemR elem , e ;
26
+ JsQueryItem elem , e ;
27
27
28
28
check_stack_depth ();
29
29
@@ -112,7 +112,7 @@ recursiveExtract(JsQueryItemR *jsq, bool indirect, PathItem *path)
112
112
result -> path = path ;
113
113
result -> indirect = indirect ;
114
114
result -> bounds .inequality = false;
115
- result -> bounds .exact = (JsQueryItemR * )palloc (sizeof (JsQueryItemR ));
115
+ result -> bounds .exact = (JsQueryItem * )palloc (sizeof (JsQueryItem ));
116
116
jsqGetArg (jsq , result -> bounds .exact );
117
117
return result ;
118
118
case jqiIn :
@@ -146,7 +146,7 @@ recursiveExtract(JsQueryItemR *jsq, bool indirect, PathItem *path)
146
146
item -> path = pathItem ;
147
147
148
148
item -> bounds .inequality = false;
149
- item -> bounds .exact = (JsQueryItemR * )palloc (sizeof (JsQueryItemR ));
149
+ item -> bounds .exact = (JsQueryItem * )palloc (sizeof (JsQueryItem ));
150
150
* item -> bounds .exact = e ;
151
151
result -> args .items [result -> args .count ] = item ;
152
152
result -> args .count ++ ;
@@ -166,14 +166,14 @@ recursiveExtract(JsQueryItemR *jsq, bool indirect, PathItem *path)
166
166
{
167
167
result -> bounds .leftInclusive = (jsq -> type == jqiGreaterOrEqual );
168
168
result -> bounds .rightBound = NULL ;
169
- result -> bounds .leftBound = (JsQueryItemR * )palloc (sizeof (JsQueryItemR ));
169
+ result -> bounds .leftBound = (JsQueryItem * )palloc (sizeof (JsQueryItem ));
170
170
jsqGetArg (jsq , result -> bounds .leftBound );
171
171
}
172
172
else
173
173
{
174
174
result -> bounds .rightInclusive = (jsq -> type == jqiLessOrEqual );
175
175
result -> bounds .leftBound = NULL ;
176
- result -> bounds .rightBound = (JsQueryItemR * )palloc (sizeof (JsQueryItemR ));
176
+ result -> bounds .rightBound = (JsQueryItem * )palloc (sizeof (JsQueryItem ));
177
177
jsqGetArg (jsq , result -> bounds .rightBound );
178
178
}
179
179
return result ;
@@ -319,7 +319,7 @@ compareNodes(const void *a1, const void *a2)
319
319
}
320
320
321
321
static int
322
- compareJsQueryItemR ( JsQueryItemR * v1 , JsQueryItemR * v2 )
322
+ compareJsQueryItem ( JsQueryItem * v1 , JsQueryItem * v2 )
323
323
{
324
324
char * s1 , * s2 ;
325
325
int32 len1 , len2 , cmp ;
@@ -358,7 +358,7 @@ static void
358
358
processGroup (ExtractedNode * node , int start , int end )
359
359
{
360
360
int i ;
361
- JsQueryItemR * leftBound = NULL , * rightBound = NULL , * exact = NULL ;
361
+ JsQueryItem * leftBound = NULL , * rightBound = NULL , * exact = NULL ;
362
362
bool leftInclusive = false, rightInclusive = false;
363
363
ExtractedNode * child ;
364
364
@@ -391,7 +391,7 @@ processGroup(ExtractedNode *node, int start, int end)
391
391
leftBound = child -> bounds .leftBound ;
392
392
leftInclusive = child -> bounds .leftInclusive ;
393
393
}
394
- cmp = compareJsQueryItemR (child -> bounds .leftBound , leftBound );
394
+ cmp = compareJsQueryItem (child -> bounds .leftBound , leftBound );
395
395
if (cmp > 0 )
396
396
{
397
397
leftBound = child -> bounds .leftBound ;
@@ -409,7 +409,7 @@ processGroup(ExtractedNode *node, int start, int end)
409
409
rightBound = child -> bounds .rightBound ;
410
410
rightInclusive = child -> bounds .rightInclusive ;
411
411
}
412
- cmp = compareJsQueryItemR (child -> bounds .rightBound , rightBound );
412
+ cmp = compareJsQueryItem (child -> bounds .rightBound , rightBound );
413
413
if (cmp > 0 )
414
414
{
415
415
rightBound = child -> bounds .rightBound ;
@@ -593,7 +593,7 @@ ExtractedNode *
593
593
extractJsQuery (JsQuery * jq , MakeEntryHandler handler , Pointer extra )
594
594
{
595
595
ExtractedNode * root ;
596
- JsQueryItemR jsq ;
596
+ JsQueryItem jsq ;
597
597
598
598
jsqInit (& jsq , jq );
599
599
root = recursiveExtract (& jsq , false, NULL );
0 commit comments