Better SQL Support

Lightweight JDBC enhancement library. Joinless ORM.

License

License

GroupId

GroupId

io.github.yeagy
ArtifactId

ArtifactId

bss
Last Version

Last Version

0.5.1
Release Date

Release Date

Type

Type

jar
Description

Description

Better SQL Support
Lightweight JDBC enhancement library. Joinless ORM.
Project URL

Project URL

https://github.com/yeagy/bss
Source Code Management

Source Code Management

https://github.com/yeagy/bss

Download bss

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.yeagy/bss/ -->
<dependency>
    <groupId>io.github.yeagy</groupId>
    <artifactId>bss</artifactId>
    <version>0.5.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.yeagy/bss/
implementation 'io.github.yeagy:bss:0.5.1'
// https://jarcasting.com/artifacts/io.github.yeagy/bss/
implementation ("io.github.yeagy:bss:0.5.1")
'io.github.yeagy:bss:jar:0.5.1'
<dependency org="io.github.yeagy" name="bss" rev="0.5.1">
  <artifact name="bss" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.yeagy', module='bss', version='0.5.1')
)
libraryDependencies += "io.github.yeagy" % "bss" % "0.5.1"
[io.github.yeagy/bss "0.5.1"]

Dependencies

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : hamcrest-junit jar 2.0.0.0
com.h2database : h2 jar 1.4.189

Project Modules

There are no modules declared in this project.

Build Status Maven Central Javadocs

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!

BetterPreparedStatement

  • :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)

BetterResultSet

  • null-safe primitive get methods!
  • java 8 time get methods
  • SQL arrays casted to their java type

BetterSqlSupport

  • provides a compact lambda based API encapsulating common CRUD usage of JDBC
  • additional fluent statement builder API for added flexibility

BetterSqlMapper

  • joinless ORM
  • simple convention with annotation overrides
  • additional fluent select builder API allows any query to automagically map to a POJO

BetterSqlTransaction

  • encapsulates the JDBC transaction process into a simple lambda based API

BetterSqlGenerator

  • 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>

Versions

Version
0.5.1
0.5.0
0.4.0
0.3.2
0.3.1
0.3.0