(self, tbl, src_row, dst_row)
Create sql for missed update.
Create sql for missed update.
Create sql for missed update .
def got_missed_update(self, tbl, src_row, dst_row):
        """Create sql for missed update."""
        self.cnt_update += 1
        fld_list = self.common_fields
        set_list = []
        whe_list = []
        for f in self.pkey_list:
            self.addcmp(whe_list, skytools.quote_ident(f), unescape(src_row[f]))
        for f in fld_list:
            v1 = src_row[f]
            v2 = dst_row[f]
            if self.cmp_value(v1, v2) == 0:
                continue

            self.addeq(set_list, skytools.quote_ident(f), unescape(v1))
            self.addcmp(whe_list, skytools.quote_ident(f), unescape(v2))

        q = "update only %s set %s where %s;" % (
                tbl, ", ".join(set_list), " and ".join(whe_list))
        self.show_fix(tbl, q, 'update')
def got_missed_update ( self , tbl , src_row , dst_row ) : self . cnt_update += 1 fld_list = self . common_fields set_list = [ ] whe_list = [ ] for f in self . pkey_list : self . addcmp ( whe_list , skytools . quote_ident ( f ) , unescape ( src_row [ f ] ) ) for f in fld_list : v1 = src_row [ f ] v2 = dst_row [ f ] if self . cmp_value ( v1 , v2 ) == 0 : continue self . addeq ( set_list , skytools . quote_ident ( f ) , unescape ( v1 ) ) self . addcmp ( whe_list , skytools . quote_ident ( f ) , unescape ( v2 ) ) q = "update only %s set %s where %s;" % ( tbl , ", " . join ( set_list ) , " and " . join ( whe_list ) ) self . show_fix ( tbl , q , 'update' )