Added upsert query. (Merge example)