Question on INSERT ON DUPLICATE KEY UPDATE
Ok, nevermind, I figured it out. I just had the syntax wrong, this is it: 

```
CarrierRateModel.insert_many([model_to_dict(r) for r in rates[i:i + bulk_size]]).on_conflict(
                update={
                    CarrierRateModel.updated: (CarrierRateModel.rate != fn.VALUES(CarrierRateModel.rate)),
                    CarrierRateModel.rate: fn.VALUES(CarrierRateModel.rate)
                }
            ).execute()
```
This is more of a question than an issue as I am unsure of how to do something. I have a simple table like this:

```
class CarrierRateModel(Model):

    age = DoubleField(null=True)
    rate = DoubleField(null=True)
    rate_set_id = CharField(null=False, index=True)
    updated = BooleanField(default=False, index=True)

    class Meta:
        db_table = 'rate'
        # each rate should be unique to the rate set and age. this allows us to update rates later
        primary_key = CompositeKey('age', 'rate_set_id')
```

I am using the insert function to then upsert into this table. What I want to do is insert many rows and if the rate column changes when there is a duplicate, set the updated flag to True. In SQL, I would do it as such:

```
INSERT INTO rate (age, rate, rate_set_id, updated) 
VALUES (1.0, 3.0, 'abc123', 0) 
ON DUPLICATE KEY UPDATE updated = (rate != VALUES(rate) ), rate=VALUES(rate);
```

This works. It will insert into the table, if there is a duplicate it sets the rate to the new rate and the update flag to true if the new rate didn't equal the old one.

How would I do this with peewee? Reading through the docs, I had thought the [EXCLUDED helper](http://docs.peewee-orm.com/en/latest/peewee/api.html#EXCLUDED) was the way to go, so I tried this:

```
CarrierRateModel.insert(age=rate.age, rate=rate.rate, rate_set_id=rate.rate_set_id).on_conflict(
                update={
                    CarrierRateModel.rate: EXCLUDED.rate,
                    CarrierRateModel.updated: CarrierRateModel.rate != EXCLUDED.rate
                }
            ).execute()
```

But I just get the error:

```
pymysql.err.InternalError: (1054, "Unknown column 'EXCLUDED.rate' in 'field list'")
```

I am not quite sure what the EXCLUDED helper is supposed to do or how it works. Am I using this correctly? Is this not the right approach?

I even tried to be more literal and use fn.VALUES, but this just throws a SQL syntax error: 

```
CarrierRateModel.insert(age=rate.age, rate=rate.rate, rate_set_id=rate.rate_set_id).on_conflict(
                update={
                    CarrierRateModel.rate: fn.VALUES(rate),
                    CarrierRateModel.updated: CarrierRateModel.rate != fn.VALUES(rate)
                }
            ).execute()
```

How would I replicate that SQL? If I try to use any of the conflict_* parameters in on_conflict, I just get this: 

```
MySQL does not support the specification of where clauses or conflict targets for conflict resolution.
```

I am using MariaDB 10.3.20 and peewee 3.13.1  