mysql2pgsql/lib/postgres_file_writer.py
def truncate(self, table):
        """Write DDL to truncate the specified `table`

        :Parameters:
          - `table`: an instance of a :py:class:`mysql2pgsql.lib.mysql_reader.MysqlReader.Table` object that represents the table to read/write.

        Returns None
        """
        truncate_sql, serial_key_sql = super(PostgresFileWriter, self).truncate(table)
        self.f.write("""
-- TRUNCATE %(table_name)s;
%(truncate_sql)s
""" % {'table_name': table.name, 'truncate_sql': truncate_sql})

        if serial_key_sql:
            self.f.write("""
%(serial_key_sql)s
""" % {
    'serial_key_sql': serial_key_sql})
def truncate(self, table):
        """Write DDL to truncate the specified `table`

        :Parameters:
          - `table`: an instance of a :py:class:`mysql2pgsql.lib.mysql_reader.MysqlReader.Table` object that represents the table to read/write.

        Returns None
        """
        truncate_sql, serial_key_sql = super(PostgresFileWriter, self).truncate(table)
        self.f.write("""
-- TRUNCATE %(table_name)s;
%(truncate_sql)s
""" % {'table_name': table.name, 'truncate_sql': truncate_sql})

        if serial_key_sql:
            self.f.write("""
%(serial_key_sql)s
""" % {
    'serial_key_sql': serial_key_sql})
Write DDL to truncate the specified `table`

        :Parameters:
          - `table`: an instance of a :py:class:`mysql2pgsql.lib.mysql_reader.MysqlReader.Table` object that represents the table to read/write.

        Returns None