Subject Re: [IB-Architect] Trigger Templates
Author Joseph Alba
>After the instantiation, modifications to the original template do not
affect the
>generated code, unless there is specific operator intervention.

This would be quite primitive (and dangerous). Templates/Class/Interface
definitions should always impact the instantiated objects.

I was thinking that the implementation could be done in system tables like:

RDB$TEMPLATE
-> RDB$TEMPLATE_ID, RDB$TEMPLATE_NAME, ...

RDB$RELATION_TEMPLATE
-> RDB$RELATION_ID, RDB$TEMPLATE_ID, ...

---
Something very similar to ROLES.
Or method/property lookups in object-oriented implementations.

The blr code can stick with templates, compiled with templates,

but each table keeps a reference to the templates that it uses.(through a
many-to-many system table like the one above).

It can also have same referential integrity rules (like you can require the
table to delete the trigger template reference if the template is deleted,
or you can require that a template cannot be deleted if some table is
referencing it.)

With a lookup (referential) implementation of template triggers, the
simplification of trigger codes will have the same impact as object-oriented
methods had on traditional structured programming. (I think).

Joseph Alba
jalba@...