Subject Re: Java Routines (was Re: [Firebird-Architect] Re: External Engines (and Plugins))
Author Roman Rokytskyy
>> 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...

Hmmm... we did not think about it :) Makes sense.

>> 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.

Fine.

>> 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.

Hmmm... why do we need table name, new. and old. contexts in normal code
via TLS?

Roman