[#1744] Add support for the CUBRID DECR() function
This commit is contained in:
parent
bea0a4917b
commit
ebef56c7d8
@ -149,4 +149,17 @@ public class CUBRIDFactory extends Factory {
|
||||
public static <T> Field<T> incr(Field<T> field) {
|
||||
return field("{incr}({0})", field.getDataType(), field);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CUBRID-specific <code>DECR()</code> function.
|
||||
* <p>
|
||||
* This function can be used to increment a field value in a
|
||||
* <code>SELECT</code> statement as such: <code><pre>
|
||||
* SELECT article, DECR(read_count)
|
||||
* FROM article_table
|
||||
* WHERE article_id = 130,987</pre></code>
|
||||
*/
|
||||
public static <T> Field<T> decr(Field<T> field) {
|
||||
return field("{decr}({0})", field.getDataType(), field);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user