File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -262,30 +262,30 @@ func (d CommentDirectives) IsSet(key string) bool {
262262}
263263
264264// SkipQueryPlanCacheDirective returns true if skip query plan cache directive is set to true in query.
265- func SkipQueryPlanCacheDirective (stmt Statement ) ( skipQuerPlanCacheDirective bool ) {
265+ func SkipQueryPlanCacheDirective (stmt Statement ) bool {
266266 switch stmt := stmt .(type ) {
267267 case * Select :
268268 directives := ExtractCommentDirectives (stmt .Comments )
269269 if directives .IsSet (DirectiveSkipQueryPlanCache ) {
270- skipQuerPlanCacheDirective = true
270+ return true
271271 }
272272 case * Insert :
273273 directives := ExtractCommentDirectives (stmt .Comments )
274274 if directives .IsSet (DirectiveSkipQueryPlanCache ) {
275- skipQuerPlanCacheDirective = true
275+ return true
276276 }
277277 case * Update :
278278 directives := ExtractCommentDirectives (stmt .Comments )
279279 if directives .IsSet (DirectiveSkipQueryPlanCache ) {
280- skipQuerPlanCacheDirective = true
280+ return true
281281 }
282282 case * Delete :
283283 directives := ExtractCommentDirectives (stmt .Comments )
284284 if directives .IsSet (DirectiveSkipQueryPlanCache ) {
285- skipQuerPlanCacheDirective = true
285+ return true
286286 }
287287 default :
288- skipQuerPlanCacheDirective = false
288+ return false
289289 }
290- return skipQuerPlanCacheDirective
290+ return false
291291}
You can’t perform that action at this time.
0 commit comments