My code is the following:
CREATE ALIAS my_stored_proc AS '
import java.math.BigDecimal;
@CODE
BigDecimal send() {
return BigDecimal.ONE;
}
';
----------------
// call the send routine to csmp
SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate)
.withFunctionName("my_stored_proc");
SqlParameterSource paramMap = new MapSqlParameterSource()
.addValue("id", 1);
BigDecimal result = jdbcCall.executeFunction(BigDecimal.class,
paramMap);
-----------------
But, it is returning "null"!
Can you imagine why?
Em qui., 23 de mar. de 2023 às 21:09, Evgenij Ryazanov <[email protected]>
escreveu:
> Hello!
>
> The valid syntax is
>
> CREATE ALIAS MY_STORED_PROC AS '
> BigDecimal envia() {
> return BigDecimal.ONE;
> }
> ';
>
> because SQL NUMERIC data type is mapped to BigDecimal data type in Java.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/h2-database/92fde29d-e26e-4816-b752-d7e568b971c1n%40googlegroups.com
> <https://groups.google.com/d/msgid/h2-database/92fde29d-e26e-4816-b752-d7e568b971c1n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/h2-database/CAMbOUNTnDbbXZ36OOQpDxvAQm00jrE_d8jJF9JA5h%2BEjwVjVCQ%40mail.gmail.com.