(self, op, data, pkey_list)
Store new event.
Store new event.
Store new event .
def add_row(self, op, data, pkey_list):
        """Store new event."""

        # get pkey value
        if self.pkey_list is None:
            self.pkey_list = pkey_list
        if len(self.pkey_list) > 0:
            pk_data = (data[k] for k in self.pkey_list)
        elif op == 'I':
            # fake pkey, just to get them spread out
            pk_data = self.fake_seq
            self.fake_seq += 1
        else:
            raise Exception('non-pk tables not supported: %s' % self.table_name)

        # get full column list, detect added columns
        if not self.col_list:
            self.col_list = data.keys()
        elif self.col_list != data.keys():
            # ^ supposedly python guarantees same order in keys()
            self.col_list = data.keys()

        # add to list
        ev = BulkEvent(op, data, pk_data)
        self.ev_list.append(ev)

        # keep all versions of row data
        if ev.pk_data in self.pkey_ev_map:
            self.pkey_ev_map[ev.pk_data].append(ev)
        else:
            self.pkey_ev_map[ev.pk_data] = [ev]
def add_row ( self , op , data , pkey_list ) : # get pkey value if self . pkey_list is None : self . pkey_list = pkey_list if len ( self . pkey_list ) > 0 : pk_data = ( data [ k ] for k in self . pkey_list ) elif op == 'I' : # fake pkey, just to get them spread out pk_data = self . fake_seq self . fake_seq += 1 else : raise Exception ( 'non-pk tables not supported: %s' % self . table_name ) # get full column list, detect added columns if not self . col_list : self . col_list = data . keys ( ) elif self . col_list != data . keys ( ) : # ^ supposedly python guarantees same order in keys() self . col_list = data . keys ( ) # add to list ev = BulkEvent ( op , data , pk_data ) self . ev_list . append ( ev ) # keep all versions of row data if ev . pk_data in self . pkey_ev_map : self . pkey_ev_map [ ev . pk_data ] . append ( ev ) else : self . pkey_ev_map [ ev . pk_data ] = [ ev ]