(gd, args)
return applyrow(ev_extra1, ev_type, ev_data,
                    backup_row = ev_extra2,
                    alt_pkey_cols = altpk,
                    fkey_ref_table = conf.get('fkey_ref_table'),
                    fkey_ref_cols = conf.get('fkey_ref_cols'),
                    fkey_cols = conf.get('fkey_cols'),
                    fn_canapply = ts_canapply)
Conflict handling based on timestamp column.
Conflict handling based on timestamp column.
Conflict handling based on timestamp column .
def ts_conflict_handler(gd, args):
    """Conflict handling based on timestamp column."""

    conf = skytools.db_urldecode(args[0])
    timefield = conf['timefield']
    ev_type = args[1]
    ev_data = args[2]
    ev_extra1 = args[3]
    ev_extra2 = args[4]
    ev_extra3 = args[5]
    ev_extra4 = args[6]
    altpk = None
    if 'altpk' in conf:
        altpk = conf['altpk'].split(',')

    def ts_canapply(rnew, rold):
        return canapply_tstamp_helper(rnew, rold, timefield)

    return applyrow(ev_extra1, ev_type, ev_data,
                    backup_row = ev_extra2,
                    alt_pkey_cols = altpk,
                    fkey_ref_table = conf.get('fkey_ref_table'),
                    fkey_ref_cols = conf.get('fkey_ref_cols'),
                    fkey_cols = conf.get('fkey_cols'),
                    fn_canapply = ts_canapply)
def ts_conflict_handler ( gd , args ) : conf = skytools . db_urldecode ( args [ 0 ] ) timefield = conf [ 'timefield' ] ev_type = args [ 1 ] ev_data = args [ 2 ] ev_extra1 = args [ 3 ] ev_extra2 = args [ 4 ] ev_extra3 = args [ 5 ] ev_extra4 = args [ 6 ] altpk = None if 'altpk' in conf : altpk = conf [ 'altpk' ] . split ( ',' ) def ts_canapply ( rnew , rold ) : return canapply_tstamp_helper ( rnew , rold , timefield ) return applyrow ( ev_extra1 , ev_type , ev_data , backup_row = ev_extra2 , alt_pkey_cols = altpk , fkey_ref_table = conf . get ( 'fkey_ref_table' ) , fkey_ref_cols = conf . get ( 'fkey_ref_cols' ) , fkey_cols = conf . get ( 'fkey_cols' ) , fn_canapply = ts_canapply )