def compile_delete(self, query):
        table = self.wrap_table(query.from__)

        if isinstance(query.wheres, list):
            wheres = self._compile_wheres(query)
        else:
            wheres = ''

        if query.joins:
            joins = ' %s' % self._compile_joins(query, query.joins)

            sql = 'DELETE %s FROM %s%s %s' % (table, table, joins, wheres)
        else:
            sql = 'DELETE FROM %s %s' % (table, wheres)

        sql = sql.strip()

        if query.orders:
            sql += ' %s' % self._compile_orders(query, query.orders)

        if query.limit_:
            sql += ' %s' % self._compile_limit(query, query.limit_)

        return sql
Returns the number of buckets
dataset/ETHPy150Open sdispater/orator/orator/query/grammars/mysql_grammar.py/MySQLQueryGrammar.compile_delete--crossover with--dataset/ETHPy150Open ambitioninc/django-query-builder/querybuilder/fields.py/NTileField.get_field_identifier