

def _truncate_table(self, model_class, restart_identity=False, cascade=False):
    ddl = [SQL('TRUNCATE TABLE'), model_class.as_entity()]
    if restart_identity:
        ddl.append(SQL('RESTART IDENTITY'))
    if cascade:
        ddl.append(SQL('CASCADE'))
    return Clause(*ddl)

dataset/ETHPy150Open coleifer/peewee/peewee.py QueryCompiler._truncate_table/original