What is the role of suspend in a procedure in Firebird?
What is the role of suspend in a procedure in Firebird?
As it seems, with a very quick search on Google, suspend
suspends execution of a procedure that is bringing a result table until the caller asks to bring the rest of the results .
Sources:
"Only for SELECT procedures which return tables: Waits for the client to request the next line. Returns the next line to the client." link
"The SUSPEND command informs the Stored Procedure to suspend execution until the client requests data." link
In a stored procedure, the suspend
function is to send a current output row of the output parameters ( returns
). Every suspend
, a new row is sent as a result.
The function of suspend
in a Stored Procedure (SP) is to suspend the code on that line before the suspend
and print on the screen the result of that code, basically the same as saying "print" . In an allusion to basic programming (C ++) would be the equivalent of printf
.