I process SelectQuery
object using hook_query_TAG_after()
or hook_query_alter()
.
I want to remove 'mytag' tag, which has been added as $query->addTag('mytag')
somewhere else. Apparently, neither SelectQuery
, nor QueryAlterableInterface
has appropriate interface method.
Is there any means (besides SelectQuery
subclassing) that I can use to remove a tag?
The reason may be the following (thanks Clive for asking):
I want to make a decision based on (expected) record set size inside hook_query_TAG_after()
I could do $countQuery = $query->countQuery(); $total = $countQuery->execute()->fetchField()
But, the cloned query will have same tag as original one and execute()
will invoke the same hook ad infinitum.