Documenting query helper function.