micronaut-projects / micronaut-data

Ahead of Time Data Repositories
Apache License 2.0
462 stars 195 forks source link

Add support for easy invoking and binding the result of a stored procedure #1194

Open graemerocher opened 2 years ago

graemerocher commented 2 years ago

Feature description

Currently Micronaut Data JDBC has no simple way to invoke stored procedures

loiclefevre commented 2 years ago

Agree it would be great as for example, the Oracle database 19c has tons of already existing stored procedures or functions available through so-called PL/SQL packages: https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/

The JDBC API has a way to retrieve information on existing stored procedures, stored functions, packages or catalogs containing these as well as all the information about returned values and parameters. Look for https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getFunctionColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String) for instance