You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Shazin Sadakath <sh...@gmail.com> on 2009/11/25 09:50:47 UTC
Regarding Stored Procedures
Hi All,
Can anyone tell me what happens and what are the classes associated with
below SQL Command send via a JDBC statement to Derby Engine.
Statement 1
"CALL XXX()"
Statement 2
"VALUES YYY()"
XXX() is a Procedure
YYY() is a Function
Thanks in advance,
Shazin
Re: Regarding Stored Procedures
Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Shazin,
Compilation for these method calls is handled by StaticMethodCallNode.
StaticMethodCallNode.generateExpression() generates the byte code needed
to invoke the user-defined routine at execution time.
If you are interested in puzzling through the details, I recommend
viewing the abstract syntax trees in xml, as shown on DERBY-4415. This
will help you see what classes are involved during compilation.
The main execution-time class is a generated class, which Derby creates
during compilation. If you want to examine the generated class, follow
the instructions here: http://wiki.apache.org/db-derby/DumpClassFile
Hope this helps,
-Rick
Shazin Sadakath wrote:
> Hi All,
>
> Can anyone tell me what happens and what are the classes associated with
> below SQL Command send via a JDBC statement to Derby Engine.
>
> Statement 1
> "CALL XXX()"
>
> Statement 2
> "VALUES YYY()"
>
> XXX() is a Procedure
> YYY() is a Function
>
> Thanks in advance,
> Shazin