Propage SqlState through JDBC
- Dominant language
- Java
- Stars
- 2k
- Forks
- 990
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
**Is your feature request related to a problem? Please describe.**
We have to handle certain SqlStates by parsing exception text, which is dangerous taking future changes into account.
Particularly we need to handle:
- table does not exists when dropping or selecting a table
- table already exists when creating a table
**Describe the solution you'd like**
SqlState is filled with deterministic codes.
**Describe alternatives you've considered**
We have to handle certain SqlStates by parsing exception text, which is dangerous taking future changes into account.
**Additional context**
My use case: we create cache tables in Drill/Dremio and register related metadata about those tables in our Redis.
It may happen that cache table disappears or Redis is purged.
Then we may try to create duplicate table or drop non-existing table.
We need to be able to detect TABLE DOES NOT EXIST and TABLE ALREADY EXISTS states and react accordingly.
Parsing exception text is definitely not optimal solution, message can be changed and bad things can happen.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.