I have a VoltDB database with a table. I want get the result of my VoltDB stored procedure. This is the code
import org.voltdb.*;
public class isola extends VoltProcedure {
public final SQLStmt getLeast = new SQLStmt(" SELECT codice FROM prova WHERE ID=1;" );
public VoltTable[] run() throws VoltAbortException {
voltQueueSQL(getLeast);
VoltTable[] queryresults = voltExecuteSQL();
String results= queryresults[0].toString();
System.out.println("String: \n " + results);
return voltExecuteSQL();
}
}
And this is the output
String:
header size: 14
status code: -128 column count: 1
(CODICE:INTEGER), rows -
2
The correct result of query is only 2.
Why do I get this result? I want to have only 2 as a result.
Thanks in advance