Hi, I'd like to throw in my 2 cents about this.
Firstly, I think pure SQL triggers would be a terrific (as in 'marvelous' or 'wonderful') addition/improvement to H2. Personally, I think the restriction to Java triggers is severe: Secondly, I think the following features should be supported by SQL triggers: - As far as some SQL mini language is concerned, I can't see the need for such a thing - I suggest the DML part of the current SQL dialect should be supported. In other words, H2 should support the DML part of H2 SQL. No need to support other dialects. - Access to 'old' and 'new' row states, as far as applicable. - Mechanisms to deny or approve the triggering event, as far as applicable. I don't know how much work this would take, but still it would be an extremely useful feature, imho. Any comments deeply appreciated. Cheers, Carsten Am Dienstag, 28. Februar 2017 07:44:30 UTC+1 schrieb Thomas Mueller Graf: > > Hi, > > One problem is that there is no "standard" SQL mini language. As soon as > we support something, people would complain it doesn't support their use > case. > > Regards, > Thomas > > On Thursday, January 19, 2017, Noel Grandin <[email protected] > <javascript:>> wrote: > >> No, I meant that I'd be happy to accept a patch that implemented such a >> thing, not that I intended to do it myself >> On Thu, 19 Jan 2017 at 16:35, Yan <[email protected]> wrote: >> >>> Thanks Noel - any target release and ETA for it ? >>> >>> >>> On Wednesday, January 18, 2017 at 11:29:38 PM UTC-5, Noel Grandin wrote: >>> >>>> I'd be happy with a patch that did that >>>> >>> On Tue, 17 Jan 2017 at 22:47, Yan <[email protected]> wrote: >>>> >>> Fair enough Noel. >>>>> >>>>> What about opening up inline java coding like alias/functions ? >>>>> Currently triggers must refer to an existing compiled class - the >>>>> alternative to provide the java code in the trigger creation statement >>>>> would really be a plus. >>>>> >>>>> As an alias gets implicitly the connection, a trigger method would in >>>>> addition receive the old and new rows. >>>>> >>>>> >>>>> On Monday, January 16, 2017 at 1:56:20 PM UTC-5, Noel Grandin wrote: >>>>>> >>>>>> we have triggers, we just don't have triggers implemented in some >>>>>> embedded SQL mini-language. >>>>>> >>>>>> http://h2database.com/html/grammar.html#create_trigger >>>>>> >>>>>> I don't think this is likely to happen any time soon, since I >>>>>> consider the current solution adequate, and I don't see the point in >>>>>> creating a half-baked trigger language when we can already use a >>>>>> full-featured language like Java. >>>>>> >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "H2 Database" group. >>>>> >>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To post to this group, send email to [email protected]. >>>> >>>> >>>>> Visit this group at https://groups.google.com/group/h2-database. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "H2 Database" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/h2-database. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "H2 Database" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/h2-database. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
