def check_transaction_status(self, query):
		if self.transaction_writes and \
			query and query.strip().split()[0].lower() in ['start', 'alter', 'drop', 'create', "begin", "truncate"]:
			raise Exception, 'This statement can cause implicit commit'

		if query and query.strip().lower() in ('commit', 'rollback'):
			self.transaction_writes = 0

		if query[:6].lower() in ('update', 'insert', 'delete'):
			self.transaction_writes += 1
			if self.transaction_writes > 200000:
				if self.auto_commit_on_many_writes:
					frappe.db.commit()
				else:
					frappe.throw(_("Too many writes in one request. Please send smaller requests"), frappe.ValidationError)
Raises exception if more than 20,000 `INSERT`, `UPDATE` queries are
dataset/ETHPy150Open frappe/frappe/frappe/database.py/Database.check_transaction_status