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

Reply via email to