}
// Some dialects can't really handle this clause. Simulation
// should be done in two steps
case H2: {
throw new SQLDialectNotSupportedException("The ON DUPLICATE KEY UPDATE clause cannot be simulated for " + context.getDialect());
}
// Some databases allow for simulating this clause using a
// MERGE statement
case DB2:
case HSQLDB:
case ORACLE:
case SQLSERVER:
case SYBASE: {
context.sql(toMerge());
break;
}
default:
throw new SQLDialectNotSupportedException("The ON DUPLICATE KEY UPDATE clause cannot be simulated for " + context.getDialect());
}
}
}