Subject | Re: Java Routines (was Re: [Firebird-Architect] Re: External Engines (and Plugins)) |
---|---|
Author | Roman Rokytskyy |
Post date | 2008-06-25T17:28:54Z |
>> a) there is some interface like TriggerContext that allows me to get theHmmm... we did not think about it :) Makes sense.
>> 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 soFine.
>> 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.Hmmm... why do we need table name, new. and old. contexts in normal code
>>
>> 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.
via TLS?
Roman