def sql_flush(style, connection, only_django=False, reset_sequences=True, allow_cascade=False):
 if only_django:
  tables = connection.introspection.django_table_names(only_existing=True)
 else:
  tables = connection.introspection.table_names()
 seqs = (connection.introspection.sequence_list() if reset_sequences else ())
 statements = connection.ops.sql_flush(style, tables, seqs, allow_cascade)
 return statements

def sql_flush ( style , connection , only_django = False , reset_sequences = True , allow_cascade = False ) : if only_django : tables = connection . introspection . django_table_names ( only_existing = True ) else : tables = connection . introspection . table_names ( ) seqs = ( connection . introspection . sequence_list ( ) if reset_sequences else ( ) ) statements = connection . ops . sql_flush ( style , tables , seqs , allow_cascade ) return statements
returns a list of the sql statements used to flush the database .