The TRUNC function. Truncate a number to a given number of decimals. @param value The number to be truncated @param decimals The decimals to truncate to.
(T value, int decimals)
| 20566 | * @param decimals The decimals to truncate to. |
| 20567 | */ |
| 20568 | @NotNull |
| 20569 | @Support({ CLICKHOUSE, CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE, TRINO, YUGABYTEDB }) |
| 20570 | public static <T extends Number> Field<T> trunc(T value, int decimals) { |
| 20571 | return new Trunc<>(Tools.field(value), Tools.field(decimals)); |
| 20572 | } |
| 20573 | |
| 20574 | /** |
| 20575 | * The <code>TRUNC</code> function. |
no test coverage detected