databasewrapper-sql2o

databasewrapper-sql2o

A light-weight ORM kind of wrapper over the SQL2O

This wrapper allows you to Query database. a simple DSL syntax, supports multiple databases, integrates well with Java8.

sql2o

Sql2o is a small java library, with the purpose of making database interaction easy. When fetching data from the database, the ResultSet will automatically be filled into your POJO objects.

Kind of like an ORM, but without the SQL generation capabilities.

Performance of SELECT

Execute 1000 SELECT statements against a DB and map the data returned to a POJO. Code is available here.

MethodDuration
Hand coded ResultSet60ms
Sql2o75ms (25% slower)
Apache DbUtils98ms (63% slower)
JDBI197ms (228% slower)
MyBatis293ms (388% slower)
jOOQ447ms (645% slower)
Hibernate494ms (723% slower)
Spring JdbcTemplate636ms (960% slower)

Credits

Inspired by the project https://github.com/biezhi/anima

Baseline is written based on that project and fixed few issues and maintaining seperately

Source Code:

https://github.com/asvignesh/databasewrapper-sql2o