@@ -0,0 +1,309 @@
+def generatePagingQuery(query, startIndex, endIndex) :%0A    paginQuery = (%22SELECT * FROM ( SELECT A.*, rownum rn FROM ( %22 %0A                  + query %0A                  + %22 ) A WHERE rownum %3C %22 + str(endIndex) %0A                  + %22  ) B WHERE rn %3E= %22 + str(startIndex)%0A                 ) %0A    return paginQuery

generate oracle pagination for native query