Skip to content

Shared module to detect the SQL errors

Marek Szuba requested to merge experimental/sql_error_detection into master

Created by: muffato

Use case

This is a follow-up of #73 . Several modules check the SQL error to reconnect, restart the transaction, etc, and sometimes several modules share the exact same piece of code.

Description

I have created a new module that catalogues the various error messages known to each driver. Consumers (usually *DBConnection and StatementHandle) can then use helper functions to detect whether the message is of a certain error or not

Possible Drawbacks

None I can think ok

Testing

Have you added/modified unit tests to test the changes?

No, there are already some tests for that

If so, do the tests pass/fail?

N/A

Have you run the entire test suite and no regression was detected?

Yes

Merge request reports