sqlex-mapper

Map java.sql.SQLException to more a meaningful exceptions hierarchy

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.bzdyl
Идентификатор

Идентификатор

sqlex-mapper
Последняя версия

Последняя версия

0.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

sqlex-mapper
Map java.sql.SQLException to more a meaningful exceptions hierarchy
Ссылка на сайт

Ссылка на сайт

https://github.com/pbzdyl/sqlex-mapper
Система контроля версий

Система контроля версий

https://github.com/pbzdyl/sqlex-mapper

Скачать sqlex-mapper

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.bzdyl/sqlex-mapper/ -->
<dependency>
    <groupId>net.bzdyl</groupId>
    <artifactId>sqlex-mapper</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/net.bzdyl/sqlex-mapper/
implementation 'net.bzdyl:sqlex-mapper:0.1.1'
// https://jarcasting.com/artifacts/net.bzdyl/sqlex-mapper/
implementation ("net.bzdyl:sqlex-mapper:0.1.1")
'net.bzdyl:sqlex-mapper:jar:0.1.1'
<dependency org="net.bzdyl" name="sqlex-mapper" rev="0.1.1">
  <artifact name="sqlex-mapper" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.bzdyl', module='sqlex-mapper', version='0.1.1')
)
libraryDependencies += "net.bzdyl" % "sqlex-mapper" % "0.1.1"
[net.bzdyl/sqlex-mapper "0.1.1"]

Зависимости

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.assertj : assertj-core jar 3.3.0

Модули Проекта

Данный проект не имеет модулей.

sqlex-mapper

Map java.sql.SQLException to a more meaningful exceptions hierarchy

Exception handling in JDBC is not easy. It provides base java.sql.SQLException with getSQLState and getErrorCode information but it's vendor specific and cumbersome to use. Yes, JDBC 4 (since Java 6) provides some improvements (additional exception hierarchy including classes like java.sql.SQLIntegrityConstraintViolationException etc.). Unfortunately not all SQL vendors catched up with those improvements (e.g. PostgreSQL still uses a single class for all kinds of errors).

This projects borrows the idea and code from Spring Framework. It provides simplified version of SQLExceptionTranslator - SqlExceptionMapper.

The default implementation of SqlExceptionMapper provides translation similar to SQLErrorCodeSQLExceptionTranslator and uses the same error codes mapping.

This is a very early version and API can still change.

Credits

Big 'thank you' goes to Spring Framework team for their implementation.

License

This project is released under version 2.0 of the [Apache License][].

Версии библиотеки

Версия
0.1.1
0.1.0