oplus/epm/record.py
def copy(self, new_name=None):
        """
        Parameters
        ----------
        new_name: str, default None
            record's new name (if table has a name). If None although record has a name, a random uuid will be given.

        Returns
        -------
        Copied record.
        """
        # todo: check this really works, !! must not use same link, hook, external_file, ... for different records !!
        # auto pk tables can just be copied
        if self._table._dev_auto_pk:
            return self._table.add(self._data)

        # for ref pk tables, must manage name
        name = str(uuid.uuid4()) if new_name is None else new_name
        new_data = dict((k, name if k == 0 else v) for (k, v) in self._data.items())
        return self._table.add(new_data)
def copy(self, new_name=None):
        """
        Parameters
        ----------
        new_name: str, default None
            record's new name (if table has a name). If None although record has a name, a random uuid will be given.

        Returns
        -------
        Copied record.
        """
        # todo: check this really works, !! must not use same link, hook, external_file, ... for different records !!
        # auto pk tables can just be copied
        if self._table._dev_auto_pk:
            return self._table.add(self._data)

        # for ref pk tables, must manage name
        name = str(uuid.uuid4()) if new_name is None else new_name
        new_data = dict((k, name if k == 0 else v) for (k, v) in self._data.items())
        return self._table.add(new_data)
Parameters
        ----------
        new_name: str, default None
            record's new name (if table has a name). If None although record has a name, a random uuid will be given.

        Returns
        -------
        Copied record.