osalvador / tePLSQL

PL/SQL Template engine
http://osalvador.github.io/tePLSQL/
MIT License
65 stars 18 forks source link

Ability to use temporary Templates #23

Open MikeKutz opened 8 years ago

MikeKutz commented 8 years ago

As I work on a template editor application, I find that I need to test the templates that I am creating from within the application. Because the templates are incomplete, the templates should not be part of the TE_TEMPLATES table.

All templates being edited by application would need to be accessed by the tePLSQL engine. As such, all the templates would need to be pushed to the DB Server. They don't need to reside there across tePLSQL calls.

Should this enhancement be developed?

If so, which method should be used?

I'm leaning towards Option 2.

Thanks,

MK

MikeKutz commented 6 years ago

The implementation of #29 suggests that the temporary templates can be part of the p_vars parameter for render and process. The template code will need to be limited to 32767 bytes each.

A new internal variable would need to be created so that one can choose to retrieve the template code from the table TE_TEMPLATES or the associative array p_vars.

MikeKutz commented 4 years ago

To support #34 , I was thinking about using a Private Temporary Table (PTT).

Cons

Pros

jgebal commented 4 years ago

Would GTT suffice? That way you don't need 19c to use it.

MikeKutz commented 4 years ago

I'm still deciding between GTT and PTT.

Since the package is Invoker's Rights, a PTT appears to have a slight advantage over GTT.

The advantage of a PTT: The PTT ,that the Invoker creates, will disappear at the end of a transaction/session.

Most likely, I'll start with a GTT, possibly make PTT as a runtime option.