Show all tags for a views query?
I believe you mean hook_query_alter() here by mentioning hasTag(), hasAllTags(), and hasAnyTag() not hook_views_query_alter().

You can understand more about these methods from this documentation.

By help of these methods you can specify the targeted query, when you apply this in your module. A example code has been given in answer at Stackoverflow question, which helped me long ago to modify a query of views.

function MY_MODULE_query_alter(QueryAlterableInterface $query) {
  if ($query-&gt;hasAllTags('views', '[MY VIEW NAME]')) {
    $query-&gt;addJoin('INNER', 'taxonomy_index', 'ti', 'node.nid = ti.nid');
    $query-&gt;condition('ti.tid', '2,3', 'IN');
  }
}


If you are looking for the tags which you can use, just try to print $query inside the hook &amp; see the result on the page where you are working. You will get what query you can target &amp; the tags which you can use.

I hope it helps :)