#NEWLINE# def merge_timestamps( self , created_at , put_timestamp , delete_timestamp ) : #NEWLINE# #INDENT# '\n        Used in replication to handle updating timestamps.\n\n        :param created_at: create timestamp\n        :param put_timestamp: put timestamp\n        :param delete_timestamp: delete timestamp\n        ' #NEWLINE# with self . get ( ) as conn : #NEWLINE# #INDENT# old_status = self . _is_deleted ( conn ) #NEWLINE# conn . execute ( ( '\n                UPDATE %s_stat SET created_at=MIN(?, created_at),\n                                   put_timestamp=MAX(?, put_timestamp),\n                                   delete_timestamp=MAX(?, delete_timestamp)\n            ' % self . db_type ) , ( created_at , put_timestamp , delete_timestamp ) ) #NEWLINE# if ( old_status != self . _is_deleted ( conn ) ) : #NEWLINE# #INDENT# timestamp = Timestamp ( time . time ( ) ) #NEWLINE# self . _update_status_changed_at ( conn , timestamp . internal ) #NEWLINE# #UNINDENT# conn . commit ( )