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