MCPcopy Index your code
hub / github.com/MapServer/MapServer / msExecuteQuery

Function msExecuteQuery

mapquery.c:79–119  ·  view source on GitHub ↗

** Wrapper for all query functions, just feed is a mapObj with a populated queryObj... */

Source from the content-addressed store, hash-verified

77** Wrapper for all query functions, just feed is a mapObj with a populated queryObj...
78*/
79int msExecuteQuery(mapObj *map)
80{
81 int tmp=-1, status;
82
83 /* handle slayer/qlayer management for feature queries */
84 if(map->query.slayer >= 0) {
85 tmp = map->query.layer;
86 map->query.layer = map->query.slayer;
87 }
88
89 switch(map->query.type) {
90 case MS_QUERY_BY_POINT:
91 status = msQueryByPoint(map);
92 break;
93 case MS_QUERY_BY_RECT:
94 status = msQueryByRect(map);
95 break;
96 case MS_QUERY_BY_ATTRIBUTE:
97 status = msQueryByAttributes(map);
98 break;
99 case MS_QUERY_BY_FILTER:
100 status = msQueryByFilter(map);
101 break;
102 case MS_QUERY_BY_SHAPE:
103 status = msQueryByShape(map);
104 break;
105 case MS_QUERY_BY_INDEX:
106 status = msQueryByIndex(map);
107 break;
108 default:
109 msSetError(MS_QUERYERR, "Malformed queryObj.", "msExecuteQuery()");
110 return(MS_FAILURE);
111 }
112
113 if(map->query.slayer >= 0) {
114 map->query.layer = tmp; /* restore layer */
115 if(status == MS_SUCCESS) status = msQueryByFeatures(map);
116 }
117
118 return status;
119}
120
121/*
122** msIsLayerQueryable() returns MS_TRUE/MS_FALSE

Callers 2

loadQueryParamsFunction · 0.85
mainFunction · 0.85

Calls 8

msQueryByPointFunction · 0.85
msQueryByRectFunction · 0.85
msQueryByAttributesFunction · 0.85
msQueryByFilterFunction · 0.85
msQueryByShapeFunction · 0.85
msQueryByIndexFunction · 0.85
msSetErrorFunction · 0.85
msQueryByFeaturesFunction · 0.85

Tested by

no test coverage detected