jmoiron / sqlx

general purpose extensions to golang's database/sql
http://jmoiron.github.io/sqlx/
MIT License
16.32k stars 1.09k forks source link

How to distinguish serialization error from others? #881

Open olezhek28 opened 1 year ago

olezhek28 commented 1 year ago

Hello!

I have a question about a serialization error. When I use a serializable isolation level, the database may return a serialization error. For example, the PostgreSQL documentation advises that in this case the query should be repeated. But I don't know how to understand that this error is a serialization error or not. For example, pgx has a special type of error in golang code. How to solve this problem for your library? Thank you.