Generalized query APIs.