#NEWLINE# def diff_map( self , inopfams ) : #NEWLINE# #INDENT# 'Generate SQL to transform existing operator families\n\n        :param inopfams: a YAML map defining the new operator families\n        :return: list of SQL statements\n\n        Compares the existing operator family definitions, as fetched\n        from the catalogs, to the input map and generates SQL\n        statements to transform the operator families accordingly.\n        ' #NEWLINE# stmts = [ ] #NEWLINE# for ( sch , opf , idx ) in inopfams : #NEWLINE# #INDENT# inopfam = inopfams [ ( sch , opf , idx ) ] #NEWLINE# if ( ( sch , opf , idx ) not in self ) : #NEWLINE# #INDENT# if ( not hasattr ( inopfam , 'oldname' ) ) : #NEWLINE# #INDENT# stmts . append ( inopfam . create ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# stmts . append ( self [ ( sch , opf , idx ) ] . rename ( inopfam ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# stmts . append ( self [ ( sch , opf , idx ) ] . diff_map ( inopfam ) ) #NEWLINE# #UNINDENT# #UNINDENT# for ( sch , opf , idx ) in self : #NEWLINE# #INDENT# oper = self [ ( sch , opf , idx ) ] #NEWLINE# if ( ( sch , opf , idx ) not in inopfams ) : #NEWLINE# #INDENT# oper . dropped = False #NEWLINE# #UNINDENT# #UNINDENT# return stmts