Skip to content

Commit

Permalink
Merge pull request #17 from slyfer/feature/14
Browse files Browse the repository at this point in the history
Resolve issue related to #14, #16
  • Loading branch information
robertobatts authored Apr 21, 2020
2 parents de6c5b9 + 55f920d commit f052815
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void upsertExposee(Exposee exposee, String appSource) {
String sql;
if (dbType.equals(PGSQL)) {
sql = "insert into t_exposed (key, onset, app_source) values (:key, to_date(:onset, 'yyyy-MM-dd'), :app_source)"
+ " on conflict on constraint key do nothing";
+ " on conflict on constraint key do update set onset = excluded.onset, app_source = excluded.app_source";
} else {
sql = "merge into t_exposed using (values(cast(:key as varchar(10000)), cast(:onset as date), cast(:app_source as varchar(50))))"
+ " as vals(key, onset, app_source) on t_exposed.key = vals.key"
Expand Down

0 comments on commit f052815

Please sign in to comment.