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: or via this shortcut:

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


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!