Take Query objects in c++ api.