def diff_map(self, inopfams):
        stmts = []
        # check input operator families
        for (sch, opf, idx) in inopfams:
            inopfam = inopfams[(sch, opf, idx)]
            # does it exist in the database?
            if (sch, opf, idx) not in self:
                if not hasattr(inopfam, 'oldname'):
                    # create new operator family
                    stmts.append(inopfam.create())
                else:
                    stmts.append(self[(sch, opf, idx)].rename(inopfam))
            else:
                # check operator family objects
                stmts.append(self[(sch, opf, idx)].diff_map(inopfam))

        # check existing operator families
        for (sch, opf, idx) in self:
            oper = self[(sch, opf, idx)]
            # if missing, mark it for dropping
            if (sch, opf, idx) not in inopfams:
                oper.dropped = False

        return stmts
Generate SQL to transform existing operator families
dataset/ETHPy150Open perseas/Pyrseas/pyrseas/dbobject/operfamily.py/OperatorFamilyDict.diff_map