db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Stored Procedures
Date Fri, 20 Nov 2009 14:04:53 GMT
Shazin Sadakath wrote:
> Hi All,
>
> Can anyone guide me on what classes in the source are associated with 
> creating a DerbySQL Routine please???
>
> Thanks,
> Shazin
Hi Shazin,

The processing flow is something like this:

o The parser (sqlgrammar.jj) creates a CreateAliasNode to represent the 
user's CREATE FUNCTION/PROCEDURE

o The rest of compilation for the CREATE FUNCTION/PROCEDURE statement is 
handled by the bindStatement() and makeConstantAction() methods of the 
CreateAliasNode.

o In particular, CreateAliasNode.makeConstantAction() creates the 
execution-time object which does the heavy lifting: a 
CreateAliasConstantAction object.

o At statement-execution time, the CreateAliasConstantAction populates 
the data dictionary. That is the CreateAliasConstantAction adds a 
persistent AliasDescriptor, which describes the new function/procedure.

o The AliasDescriptor is stored in SYS.SYSALIASES. The really 
interesting bits of the AliasDescriptor are the AliasInfo object which 
it contains. That AliasInfo object is stored in the ALIASINFO column of 
SYS.SYSALIASES.

Hope this helps,
-Rick


Mime
View raw message