BSS - Better SQL Support
Lightweight JDBC enhancement library. Joinless ORM.
Dependencies: Java 8.
Vanilla JDBC is a caveman experience, an early java API that feels dated.
Lots of common usages are easy to screw up, like null handling primitives, or properly executing a transaction and rollback. The index based parameter API is error prone, and support lacks for the common IN clause.
This library can enhance the JDBC experience to one that's bearable. Near decent even!
- :named parameters!!
- null-safe primitive set methods!
- java 8 time set methods
- automagic create/set array methods!
- IN clause support with array simulation!!! (for DBs that don't support arrays, like MySQL)
- null-safe primitive get methods!
- java 8 time get methods
- SQL arrays casted to their java type
- provides a compact lambda based API encapsulating common CRUD usage of JDBC
- additional fluent statement builder API for added flexibility
- joinless ORM
- simple convention with annotation overrides
- additional fluent select builder API allows any query to automagically map to a POJO
- encapsulates the JDBC transaction process into a simple lambda based API
- generate basic CRUD SQL from a POJO
Tested Databases: PostgreSQL. MySQL/MariaDB. H2.
Usage
Check out the wiki for basic usage examples. The test classes are another good reference.
<dependency>
<groupId>io.github.yeagy</groupId>
<artifactId>bss</artifactId>
<version>0.5.1</version>
</dependency>