I understand that a change would break existing code. Probably, a change could wait to the next major release.
I just wanted to stress the fact that I thought it was unwise to re-use an existing, well-defined contract (ResultSet), without implementing it correctly. Even if "you're not supposed to" pass the ResultSet instance to "anything else consuming it", well, client trigger code has to consume it somehow, and they're likely to consume it according to the general contract. So there's no escape :-) Here are a couple of other SimpleResultSet methods, that do not work correctly in the context of a trigger: Trigger ResultSets are updatable, but these methods return "default" values, which do not reflect that: - getConcurrency() - isReadOnly(int) (from ResultSetMetaData) - isWritable(int) (from ResultSetMetaData) - isDefinitelyWritable(int) (from ResultSetMetaData) And these SimpleResultSet methods behave badly in any context: - beforeFirst() works even if getType() is TYPE_FORWARD_ONLY. However, it doesn't work correctly, as a call to next() is required after a call to beforeFirst(), i.e. currentRow should be reset (at least). It would probably be useful, if the type of the SimpleResultSet was changed to TYPE_SCROLL_INSENSITIVE, and then, if all the relevant methods, such as first(), last(), etc. were implemented. I can help with some implementations (e.g. making the SimpleResultSet TYPE_SCROLL_INSENSITIVE), if you agree with the above Cheers Lukas Am Samstag, 16. März 2013 17:12:56 UTC+1 schrieb Noel Grandin: > > TriggerAdapter is a special case. > > You are not supposed to be passing the object to anything else that > consumes ResultSet's. > > Yes, we could "fix" it by creating a custom interface, but that would > break existing code. > -- 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 http://groups.google.com/group/h2-database?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
