mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #30242 -- Removed extra space before LIMIT/OFFSET SQL.
This commit is contained in:
		
				
					committed by
					
						
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							a35bf4af72
						
					
				
				
					commit
					142e1ead76
				
			
							
								
								
									
										1
									
								
								AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								AUTHORS
									
									
									
									
									
								
							@@ -325,6 +325,7 @@ answer newbie questions, and generally made Django that much better:
 | 
			
		||||
    Guillaume Pannatier <guillaume.pannatier@gmail.com>
 | 
			
		||||
    Gustavo Picon
 | 
			
		||||
    hambaloney
 | 
			
		||||
    Hang Park <hangpark@kaist.ac.kr>
 | 
			
		||||
    Hannes Struß <x@hannesstruss.de>
 | 
			
		||||
    Hasan Ramezani <hasan.r67@gmail.com>
 | 
			
		||||
    Hawkeye
 | 
			
		||||
 
 | 
			
		||||
@@ -218,10 +218,10 @@ class BaseDatabaseOperations:
 | 
			
		||||
    def limit_offset_sql(self, low_mark, high_mark):
 | 
			
		||||
        """Return LIMIT/OFFSET SQL clause."""
 | 
			
		||||
        limit, offset = self._get_limit_offset_params(low_mark, high_mark)
 | 
			
		||||
        return '%s%s' % (
 | 
			
		||||
            (' LIMIT %d' % limit) if limit else '',
 | 
			
		||||
            (' OFFSET %d' % offset) if offset else '',
 | 
			
		||||
        )
 | 
			
		||||
        return ' '.join(sql for sql in (
 | 
			
		||||
            ('LIMIT %d' % limit) if limit else None,
 | 
			
		||||
            ('OFFSET %d' % offset) if offset else None,
 | 
			
		||||
        ) if sql)
 | 
			
		||||
 | 
			
		||||
    def last_executed_query(self, cursor, sql, params):
 | 
			
		||||
        """
 | 
			
		||||
 
 | 
			
		||||
@@ -249,10 +249,10 @@ END;
 | 
			
		||||
 | 
			
		||||
    def limit_offset_sql(self, low_mark, high_mark):
 | 
			
		||||
        fetch, offset = self._get_limit_offset_params(low_mark, high_mark)
 | 
			
		||||
        return '%s%s' % (
 | 
			
		||||
            (' OFFSET %d ROWS' % offset) if offset else '',
 | 
			
		||||
            (' FETCH FIRST %d ROWS ONLY' % fetch) if fetch else '',
 | 
			
		||||
        )
 | 
			
		||||
        return ' '.join(sql for sql in (
 | 
			
		||||
            ('OFFSET %d ROWS' % offset) if offset else None,
 | 
			
		||||
            ('FETCH FIRST %d ROWS ONLY' % fetch) if fetch else None,
 | 
			
		||||
        ) if sql)
 | 
			
		||||
 | 
			
		||||
    def last_executed_query(self, cursor, sql, params):
 | 
			
		||||
        # https://cx-oracle.readthedocs.io/en/latest/cursor.html#Cursor.statement
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user