Results of 1 - 1 of about 1 for withName (0.001 sec.)
- Write User Defined Functions 9414
- Overview The JDBC driver can register user-defined functions (UDFs) written in Java, including scalar functions and table functions. This page covers building and registering both, from the simple functional-interface overloads to the vecto
...d register it on a connection with register() . Once registered, the function can be called from SQL by the name passed to withName() . The builder is single-use: it is finalized once register() (or close() ) is called. The simplest functions map directl...b.DuckDBFunctions; try (Connection conn = DriverManager.getConnection("jdbc:duckdb:")) { DuckDBFunctions.scalarFunction() .withName("java_add_one") .withParameter(int.class) .withReturnType(int.class) .withIntFunction(x -> x + 1) .register(conn); } SELEC...e binary overloads take two arguments of the same type, declared with withParameters() : DuckDBFunctions.scalarFunction() .withName("java_weighted_sum") .withParameters(double.class, double.class) .withReturnType(double.class) .withDoubleFunction((x, w)... - https://man.mtool.work/duckdb/2.0/clients/java/functions.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work