Forum: Building VoltDB Applications

Post: Stored Procedures: run() return type

Stored Procedures: run() return type
theschmitzer
Feb 11, 2013
Per the schema compiler, run() can return long, Long, VoltTable or VoltTable[]

I have a stored proc returning long, and cannot find in the documentation how to access the value.

Results.table is an empty array in this case. Anybody know how I get my long value? I am using voltjs node client.

Thanks

jeff
theschmitzer
Feb 11, 2013
I think I may have had an error in my stored proc, because I see the result in result.tables[0][0] now
jhugg
Feb 11, 2013
Procedures always return an array of tables. Returning a long or scalar VoltTable from your procedure is just a convenience. Ultimately that long will be put in a one-column, one-row VoltTable and put into an array of length 1.

So what you're seeing is expected.
jhugg
Feb 11, 2013
Procedures always return an array of tables. Returning a long or scalar VoltTable from your procedure is just a convenience. Ultimately that long will be put in a one-column, one-row VoltTable and put into an array of length 1.

So what you're seeing is expected.