Subject | Re: Java Routines (was Re: [Firebird-Architect] Re: External Engines (and Plugins)) |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2008-06-25T17:21:29Z |
Roman Rokytskyy escreveu:
is better to put it in TLS, but require it in method parameter (as in
your example) for triggers.
Adriano
> a) there is some interface like TriggerContext that allows me to get theand name of metadata object...
> name of the table, trigger action, new and old values,
> optionally access to context (e.g. rdb$get_context, rdb$set_context, CURRENT_USER and soThis is low priority IMHO, as it's available through SQL.
> on) and allows me to set the new values.
>
> b) correctly handles throwing exceptions to cancel the action.Such interface is also useful for procedures and functions. So I think
>
> 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
> " ...);
> }
is better to put it in TLS, but require it in method parameter (as in
your example) for triggers.
Adriano