Stored procedures
jOOQ allows you to call stored procedures via the same Routines
API. Next, let's see several examples of calling different kinds of stored procedures.
Stored procedures and output parameters
For instance, let's consider the following stored procedure expressed in Oracle and having an OUT
parameter:
CREATE OR REPLACE NONEDITIONABLE PROCEDURE "GET_AVG_PRICE_BY_PRODUCT_LINE" ( "pl" IN VARCHAR2, "average" OUT DECIMAL) AS BEGIN SELECT AVG("PRODUCT"."BUY_PRICE") INTO "average" FROM "PRODUCT" WHERE "PRODUCT"."PRODUCT_LINE" = "pl"; END;
jOOQ generates the Java version of this stored procedure as a class named GetAvgPriceByProductLine
in the jooq.generated.routines
package. The methods...