merge limit and offset into view query

if there are no more conditions to apply the limit and offset can be
merged in the view query