#NEWLINE# def fetch_size( self , v ) : #NEWLINE# #INDENT# "\n        Sets the number of rows that are fetched at a time.\n\n        *Note that driver's default fetch size is 5000.*\n\n        .. code-block:: python\n\n            for user in User.objects().fetch_size(500):\n                print(user)\n        " #NEWLINE# if ( not isinstance ( v , six . integer_types ) ) : #NEWLINE# #INDENT# raise TypeError #NEWLINE# #UNINDENT# if ( v == self . _fetch_size ) : #NEWLINE# #INDENT# return self #NEWLINE# #UNINDENT# if ( v < 1 ) : #NEWLINE# #INDENT# raise QueryException ( 'fetch size less than 1 is not allowed' ) #NEWLINE# #UNINDENT# clone = copy . deepcopy ( self ) #NEWLINE# clone . _fetch_size = v #NEWLINE# return clone