Object Type Method Body stub generation
ScottKMar 23 2011 — edited Mar 24 2011Hi,
This might be a bit much to ask, but would it be possible for the DDL File Generator to build a method body that will compile with a null body? This would apply to mainly the Oracle 11g or Oracle 10g databases for the DDL generator. The reason for this request is it would make prototyping go faster. Currently the generator does a nice job of creating the Object Type and Object Type Body, but if we could have a Begin Null; End; wrapped inside the body until we add code, that would give us a DDL script that would not have to be modified prior to running it in the database. This in turn would provide a quicker turn around when trying to prototype models.
A current sample bit of generated code looks like:
CREATE OR REPLACE TYPE BODY t_date_range
AS
MEMBER PROCEDURE set_start_date
AS
-- Empty PL/SQL Body
MEMBER PROCEDURE set_end_date
AS
-- Empty PL/SQL Body
MEMBER PROCEDURE validate_date_range
AS
-- Empty PL/SQL Body
END
;
/
If along with '-- Empty PL/SQL Body' you could add
'Begin NULL; END;'
so the code would look like:
CREATE OR REPLACE TYPE BODY t_date_range
AS
MEMBER PROCEDURE set_start_date
AS
-- Empty PL/SQL Body
BEGIN NULL; END;
MEMBER PROCEDURE set_end_date
AS
-- Empty PL/SQL Body
BEGIN NULL; END;
MEMBER PROCEDURE validate_date_range
AS
-- Empty PL/SQL Body
BEGIN NULL; END;
END
;
/
This will give code us that should compile in the database right out of the box.
Thanks in advance,
ScottK
Edited by: ScottK on Mar 23, 2011 6:20 PM
Edited by: ScottK on Mar 23, 2011 6:21 PM