Thank you for pointing me to the documentation.

I have spring Jdbc code that calls SQL server stored procs.
In order to improve the code coverage, I am writing unit tests that use H2 
in-memory db and create H2 Stored procs that have same signature as the SQL 
server stored procs.

Passing Connection object is not feasible for me. Is there another option 
for this scenario?
Ex: I specify two methods in the alias declaration - one to get the 
ResultSet column definitions and the other is the actual call.

thank you
Manas

On Saturday, 22 March 2025 at 07:56:29 UTC+5:30 Evgenij Ryazanov wrote:

> Hello!
>
> Take a look on *Using a Function as a Table* subsection in documentation, 
> here is a link to *User-Defined Functions and Stored Procedures* section:
> https://h2database.com/html/features.html#user_defined_functions
> The mentioned subsection is below, unfortunately, it doesn't have an own 
> anchor.
>
> It describes how such functions need to be implemented.
>
> They should have java.sql.Connection as their first parameter, and when 
> passed connection has URL "jdbc:columnlist:connection", they don't need 
> to return an actual data, they only need to provide an empty result set 
> with properly configured columns. H2 needs to know names and data types of 
> table columns during compilation of a query.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/h2-database/3779cae7-e499-41cb-813d-137471de5f21n%40googlegroups.com.

Reply via email to