On Nov 30, 2011, at 15:17 , Rami Ojares wrote: > Christian, you could implement your use case also as a before trigger. > There you could simply put your modified timestamp into the newRow array and > H2 will consider that as part of the update.
I didn't know modifying the given arrays was supported. Still, dealing with raw arrays is brittle as I'd have to rely on the DDL order of columns. I don't control the order of column creation directly with tools like Hibernate during development, DDL is generated. The adapter at least lets me use the ResultSet API and column names to read the data. > Can you give an exact definition to your term "current command"? > I am quessing you mean one single statement and all statements that are > somehow triggered by it. I saw the Command term in the H2 code while debugging and I might have guessed wrong that this is the "root" of the eventing that fires the initial triggers, etc. If a simple boolean check there isn't a desirable addition, so you could exit the processing of filters at a customizable point, I'd suggest rethinking the data manipulation API in fire(). Instead or in addition to raw Object[]s, a Map keyed by column names would be more robust and indicate that the values can be modified in BEFORE triggers. And if they can't (like in AFTER triggers), throw an UnsupportedOperationException with an UnmodifiableMap. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
