Welcome to the SqlMan Documentation
SqlMan is a small Java library that removes repetitive JDBC work while keeping SQL visible. Version 2.0 uses Action as the common entry point for queries, inserts, updates, and deletes.
List<Map<String, Object>> rows =
new Action(conn, "SELECT * FROM shop_address WHERE stat = ?")
.query(1)
.list();
What SqlMan provides
- Parameterized SQL execution through JDBC
PreparedStatement. - Query results as a single value, a
Map, a list, or JavaBeans. - INSERT results with optional generated-key conversion.
- Entity-based INSERT, UPDATE, and DELETE generation for Maps and JavaBeans.
- Offset-based and page-number pagination for supported database vendors.
- Parameterized batch inserts and batch deletes.
- Lightweight XML statement storage and dynamic
<if>processing withSmallMyBatis. - SQL logging with bound-parameter rendering for diagnostics.
Design principles
- SQL first: application SQL remains explicit and can use database-specific features.
- Small: the API wraps JDBC operations instead of introducing a persistence session or entity manager.
- Transparent: connections and transactions remain visible and under application control.
SqlMan is not a full ORM, a JPA implementation, or a complete MyBatis replacement. Entity support focuses on data modification; query SQL is still written explicitly.
Source code
SqlMan is licensed under the GNU General Public License v3.0.