Thursday, August 9, 2018

Quick PL/SQL, a code generator for PL/SQL based on simple markup

Maybe you've heard about "Quick SQL", a utility (previously a separate application, now part of APEX 18.1 itself) that generates SQL scripts based on a simple markup language. Quick SQL is a real time-saver and allows you to go from idea to prototype to working application in an instant.

Inspired by Quick SQL, I've created a similar utility, called "Quick PL/SQL", that does the same thing, except it generates PL/SQL code (packages with functions and procedures, with standard comment blocks, formatting, etc.) based on a simple markup.

I've recorded a couple of videos to show the tool in action.

Here is an introduction which explains the basic input syntax and the output options:



And here is another video which explains how to create standard CRUD-style (Create, Read, Update, Delete) APIs for your tables:



Try it out for yourself here: https://apex.oracle.com/pls/apex/f?p=QUICKPLSQL:HOME&c=MULEDEV or via this shortcut: https://tinyurl.com/quickplsql2

Of course, I wouldn't mind if this functionality becomes available as part of the QuickSQL utility that is built into APEX! :-)


8 comments:

Tony said...

Looks great. If I may make a suggestion, I would say that in the settings you have a toggle for logger implementation. If set to yes, then a series of logger calls are added to the different procedures, including, a when others then logger.log_error exception.

Mike Hichwa said...

Martin super cool and a great way to extend Quick SQL. This should save our developers lots of time and promote more consistent and complete code! Well done.

Morten Braten said...

@Tony: For now, you can add the [logger] attribute to any subprogram and it will generate all the logger calls, including the exception handler, for the specified subprograms. But I might also add the [logger] attribute to the package level, which would then mean this should be applied to all subprograms in the package, without having to specify this indivually.

@Mike: Thanks, glad you like it! Would be cool if you added the "package" keyword to Quick SQL with similar functionality.

- Morten

Flieger said...

Wow! This is really nice. Great work!

Unknown said...

is the app available to download and to customize? The code will always retain your signature and name/owner credit, just would like to off this to internal customers .
Is this available on GitHub or apex.world?
thanks again for the incredible excellence that is everything you touch oracle/sql/plsql /APEX !!
Armando
rmander.ca@gmail.com

Morten Braten said...

@Armando: The application and code is available at https://github.com/mortenbra/quick-plsql -- feel free to download and customize! :-)

- Morten

Mark said...

Hi Morten!

The link is down. Apex can not resolve the app alias. Thx for the code on Github.

Morten Braten said...

@Mark: The link broke because APEX app aliases are not unique across workspaces, and someone else installed the app using the same alias... ! I've updated the links to include my workspace name, so it should work again now if you use the new links.

- Morten