[#2134] Support MySQL's INSERT .. VALUES(), () ON DUPLICATE KEY UPDATE x = VALUES(x) syntax (multi-insert with update)

This commit is contained in:
lukaseder 2015-06-15 10:02:14 +02:00
parent b3635e2662
commit 6af0c2edf0

View File

@ -407,6 +407,24 @@ public class MySQLDSL extends DSL {
return function("password", string.getType(), string);
}
// -------------------------------------------------------------------------
// Other functions
// -------------------------------------------------------------------------
/**
* Get the MySQL-specific <code>VALUES()</code> function for use with
* <code>INSERT .. ON DUPLICATE KEY UPDATE</code> statements.
*
* @see <a href=
* "http://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_values">
* http://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#
* function_values</a>
*/
@Support({ MYSQL })
public static <T> Field<T> values(Field<T> values) {
return function("values", values.getDataType(), values);
}
// -------------------------------------------------------------------------
// Other utilities
// -------------------------------------------------------------------------