Integer Array as procedure param?
Mar 20, 2014
Hi,
(I'm kind of new to voltDB and actually don't know if this is the right place to post.)
I've been trying to create a stored procedure as
"SELECT data FROM table WHERE column IN ?"
(I can't define a fixed size for the "IN" list)
But using the java client, I couldn't find a way to use the .callProcedure method...
The initial .java of the procedure :
The way I'm trying to call it:
My question is what should be the type of XXX? And what should be the type of myData?
I tried with int[], String[], even a formatted String (such as "(value, value, value...)") without success.
Anyone already lived that? Any ideas?
(I'm kind of new to voltDB and actually don't know if this is the right place to post.)
I've been trying to create a stored procedure as
"SELECT data FROM table WHERE column IN ?"
(I can't define a fixed size for the "IN" list)
But using the java client, I couldn't find a way to use the .callProcedure method...
The initial .java of the procedure :
public class Z extends VoltProcedure {
public final SQLStmt findCurrent = new SQLStmt(
" SELECT * FROM table WHERE column IN ?;");
public VoltTable[] run(XXX in) throws VoltAbortException {
voltQueueSQL(findCurrent, in);
return voltExecuteSQL();
}
}
The way I'm trying to call it:
VoltTable[] res = this.voltDB.callProcedure("Z", myData).getResults();
My question is what should be the type of XXX? And what should be the type of myData?
I tried with int[], String[], even a formatted String (such as "(value, value, value...)") without success.
Anyone already lived that? Any ideas?