java - Standard SQLStates in an enum -
i'd have enum containing standard sqlstates can:
- respond expected sql failures programmatically. example, want retry operations fail due race conditions. example, 1 thread removes row referenced thread, or 2 threads attempt insert same record thereby triggering unique constraint violation.
- look meaning of error quickly. there doesn't seem all-inclusive document on sqlstates, least of meaning.
it took me long time compile information. hope helps others. source code on bitbucket.org
contributions welcome!
(i couldn't post source-code on stackoverflow because bigger 30,000 characters)
Comments
Post a Comment