Each function assigns some metadata so we can more easily process
your query downstream. In addition, we check for whether you've
used any relational operators and pull those out to make downstream
processing easier
The goal of these functions is to make it easy to combine queries
based on each of rank names, taxonomic names, and taxonomic ids.
These are designed to be used inside of [pop()], [pick()], [span()]. Inside
of those functions, we figure out what rank names you want to filter
on, then check against a reference dataset ([ranks_ref]) to allow
ordered queries like I want all taxa between Class and Genus. If you
provide rank names, we just use those, then do the filtering you requested.
If you provide taxonomic names or ids we figure out what rank names you are
referring to, then we can proceed as in the previous sentence.