def METHOD_NAME(row: Row):
    buffer.append(self.mapper.write_row(row, with_metadata=True))
    if len(buffer) > settings.BUFFER_SIZE:
        conn.execute(sa.insert(table), buffer)
        buffer.clear()
    on_row(row) if on_row else None