Create BaseQuery object and add pagination for query objects