Hi,
In trigger interface the fire method is defined as
void fire
<http://www.h2database.com/javadoc/org/h2/api/Trigger.html#fire_Connection_Object-_Object->(Connection
conn, Object[] oldRow, Object[] newRow) throws SQLException
Does the old/new row object array contain all the columns of the row or
just the ones mentioned in the insert/update statement?
Is there any way to know in what order those values are?
I mean if I do two two separate updates
UPDATE TBL SET COL1 = X, COL2 = Y
and
UPDATE TBL SET COL2 = Y, COL1 = X
Then are those values in the array in the order used in the statement.
If so, how am I able to know what value is which?
I think it would be great if instead of an Object Array old and new rows
could be represented as Map<String, Object>
that would map column names to row's values.
And also that the map would contain all the columns of the table. (Maybe
it already does, haven't tested that yet.
- Rami Ojares
--
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.