tePLSQL icon indicating copy to clipboard operation
tePLSQL copied to clipboard

Ability to use temporary Templates

Open MikeKutz opened this issue 8 years ago • 4 comments

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?

  • option 1 - use a GTT.
  • option 2 - use an associative array within the Package.

I'm leaning towards Option 2.

Thanks,

MK

MikeKutz avatar Oct 07 '16 19:10 MikeKutz

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 avatar Dec 10 '17 02:12 MikeKutz

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

Cons

  • PTTs don't support lobs.
  • Max size will be 32767.
  • Minimum DB would be required.

Pros

  • PTTs consume Temp Tablespace, not memory.

MikeKutz avatar Aug 17 '20 11:08 MikeKutz

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

jgebal avatar Aug 17 '20 13:08 jgebal

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.

MikeKutz avatar Aug 17 '20 17:08 MikeKutz