-
1. Re: How to create a stored procedure to take varargs as IN parameters using java code (no DDL)
shawkins Jul 16, 2013 7:00 AM (in response to deveshmishra)That looks like it should work and does work on latest. What version are you on? You can also replace all of the parameter creation with
ProcedureParameter param = metadataFactory.addProcedureParameter("userInfo", TypeFacility.RUNTIME_NAMES.STRING, ProcedureParameter.Type.In, saveUsersProc);
param.setVarArg(true);
I do see an issue though when calling the vararg procedure with no arguments.
Steve
-
2. Re: How to create a stored procedure to take varargs as IN parameters using java code (no DDL)
deveshmishra Jul 16, 2013 9:42 AM (in response to shawkins)Thanks Steve. I am on 8.1. Apparently it does not work, it works for Functions though. I will try to write a test case and provide. Thanks
-
3. Re: How to create a stored procedure to take varargs as IN parameters using java code (no DDL)
shawkins Jul 16, 2013 9:48 AM (in response to deveshmishra)The vararg flag on a procedure parameter was added at the metadata level initially to support ddl definition of vararg functions. Vararg procedure handling was not added until 8.2 with http://issues.jboss.org/jira/browse/TEIID-2111
Steve
-
4. Re: How to create a stored procedure to take varargs as IN parameters using java code (no DDL)
deveshmishra Jul 19, 2013 1:37 AM (in response to shawkins)Thanks Steve. I shall upgrade to latest teiid / use ddl. Thanks