parameters: (self, statement, limit, offset)
return_statement: return statement
docstring: specific method to handle Oracle's insane pagination
docstring_summary: specific method to handle Oracle's insane pagination
docstring_tokens: specific method to handle Oracle s insane pagination
function: def handle_pagination(self, statement, limit, offset):
          '''specific method to handle Oracle's insane pagination'''
  
          if limit == None:
              return statement
  
          # handle crazy logic to convert offset to start/end.  Note that
          # offset starts at 1 in oracle
          start = offset + 1
          end = start + limit - 1
  
  
          if offset == 0:
              page = "rownum between %s and %s" % (start, end)
              statement = "SELECT * FROM (%s) WHERE %s" % (statement, page)
          else:
              page = "spt_rownum between %s and %s" % (start, end)
              statement = "SELECT * FROM ( SELECT spt.*, rownum as spt_rownum FROM (%s ) spt ) WHERE %s" % (statement, page)
  
          return statement
function_tokens: def handle_pagination ( self , statement , limit , offset ) : if limit == None : return statement # handle crazy logic to convert offset to start/end.  Note that # offset starts at 1 in oracle start = offset + 1 end = start + limit - 1 if offset == 0 : page = "rownum between %s and %s" % ( start , end ) statement = "SELECT * FROM (%s) WHERE %s" % ( statement , page ) else : page = "spt_rownum between %s and %s" % ( start , end ) statement = "SELECT * FROM ( SELECT spt.*, rownum as spt_rownum FROM (%s ) spt ) WHERE %s" % ( statement , page ) return statement