Skip to content

Commit

Permalink
Merge 0a68689 into 655967e
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWay committed Jul 23, 2018
2 parents 655967e + 0a68689 commit 3f7f984
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rest_models/backend/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ def special_cases(self, result_type):
return True, result
return False, None

def execute_sql(self, result_type=MULTI, chunked_fetch=False):
def execute_sql(self, result_type=MULTI, chunked_fetch=False, chunk_size=None):
self.setup_query()
if not result_type:
result_type = NO_RESULTS
Expand Down Expand Up @@ -956,7 +956,7 @@ def next_from_query():


class SQLInsertCompiler(SQLCompiler):
def execute_sql(self, return_id=False):
def execute_sql(self, return_id=False, chunk_size=None):
query = self.query
""":type: django.db.models.sql.subqueries.InsertQuery"""
opts = query.get_meta()
Expand Down Expand Up @@ -1023,7 +1023,7 @@ def execute_sql(self, return_id=False):


class SQLDeleteCompiler(SQLCompiler):
def execute_sql(self, result_type=MULTI):
def execute_sql(self, result_type=MULTI, chunk_size=None):
if self.is_api_model():

q = self.query
Expand Down Expand Up @@ -1054,7 +1054,7 @@ def resolve_data(self):
}
}

def execute_sql(self, result_type=MULTI):
def execute_sql(self, result_type=MULTI, chunk_size=None):
updated = 0
if self.is_api_model():
q = self.query
Expand All @@ -1072,6 +1072,6 @@ def execute_sql(self, result_type=MULTI):

class SQLAggregateCompiler(SQLCompiler):

def execute_sql(self, result_type=MULTI):
def execute_sql(self, result_type=MULTI, chunk_size=None):
raise NotSupportedError("the aggregation for the database %s is not supported : %s" % (
self.connection.alias, self.query)) # pragma: no cover

0 comments on commit 3f7f984

Please sign in to comment.