With mybatis code like: // annotated @Select({ "{call sptest.adder(", "#{addend1,jdbcType=INTEGER,mode=IN},", "#{addend2,jdbcType=INTEGER,mode=IN},", "#{sum,jdbcType=INTEGER,mode=OUT})}" }) @Options(statementType = StatementType.CALLABLE) Object adderAsSelectAnnotated(Parameter parameter);

The parameter types can be automaticly determined by the information_schema.parameters table (MySQL also).

As mybatis is using the procedure, it could autoprobe these, and optionally validate any user supplied assumptions.

Comment From: harawata

Hello @grooverdan ,

Thank you for the idea, but MyBatis avoids this kind of under-the-hood queries. Closing as won't fix.