allow queries with limits and scan direction