Subject Re: Java Routines (was Re: [Firebird-Architect] Re: External Engines (and Plugins))
Author Adriano dos Santos Fernandes
Roman Rokytskyy escreveu:
> a) there is some interface like TriggerContext that allows me to get the
> name of the table, trigger action, new and old values,
and name of metadata object...

> optionally access to context (e.g. rdb$get_context, rdb$set_context, CURRENT_USER and so
> on) and allows me to set the new values.
>
This is low priority IMHO, as it's available through SQL.

> b) correctly handles throwing exceptions to cancel the action.
>
> c) the method declaration is very simple, e.g.:
>
> public static void
> myLoggingTrigger(org.firebirdsql.jdbc.FirebirdTriggerContext ctx) {
> someLog.debug("Trigger for table " + ctx.getTableName() + " action
> " ...);
> }
Such interface is also useful for procedures and functions. So I think
is better to put it in TLS, but require it in method parameter (as in
your example) for triggers.


Adriano