You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because we are using MariaDB which sometimes does not behave that nice but only produces warnings when it actually should throw errors, I'm looking for similar feature that (Spring) JdbcTemplate has, which is flag ignoreWarnings = false that throws exceptions if there are warnings in result.
I understand that this can be achieved by using ResultSet.getWarnings() but because we are not currently using ResultSet in any way but only under the hood (= only Dalesbred built-in row mappers), I'm looking for more generic solution.
Also preparedStatement.getWarnings() cannot be used because stmt is well encapsulated inside Database class implementation. Using custom transaction manager I am able to access Connection after commit but calling getWarnings() for Connection is a different case and not sufficient.
Any ideas?
The text was updated successfully, but these errors were encountered:
Sounds like a good idea. Currently there's no way to customize this, but this is the only place in Dalesbred's code that deals with ResultSets so it should be a matter of implementing it here:
However, I'm torn between a specific high-level flag like ignoreWarnings = false and a more general event-listener that could be registered to Database and would be called every time that query has been executed (among various other events). Something like:
Because we are using MariaDB which sometimes does not behave that nice but only produces warnings when it actually should throw errors, I'm looking for similar feature that (Spring) JdbcTemplate has, which is flag ignoreWarnings = false that throws exceptions if there are warnings in result.
I understand that this can be achieved by using ResultSet.getWarnings() but because we are not currently using ResultSet in any way but only under the hood (= only Dalesbred built-in row mappers), I'm looking for more generic solution.
Also preparedStatement.getWarnings() cannot be used because stmt is well encapsulated inside Database class implementation. Using custom transaction manager I am able to access Connection after commit but calling getWarnings() for Connection is a different case and not sufficient.
Any ideas?
The text was updated successfully, but these errors were encountered: