Fork me on GitHub
This has nothing to do with the "Dragon Ball";
I just happen to be a fan of this comic.

Welcome to SqlMan!

A easy, small, straight forward Java CRUD Helper.

SqlMan is a lightweight wrapper over JDBC. It is NOT an ORM but follows a SQL-first approach. It allows you to use pure SQL with IF/forEach and pass Map parameters for queries or executions. The results you receive are either 'isOk' indicators and 'Map' or Java Bean object(s). SqlMan enables fast CRUD database operations with ZERO dependencies, except for the JDK.



Similar libraries:Spring JDBC Template, Apache Commons DbUtils, Jdbi3.



Blog

The XML Template Engine

2024-12-25 by Frank Cheung

The XML Template Engine

I need to template to do the jobs like MyBatis <if><else><foreach>. However, it's not easy to achieve it. MyBatis is using own XML parser with OGNL expression engine, details here.

It's hard to copy that.

Another way is to use the common template engine, like Thymeleaf/Freemarker, but it's too heavy I think.

Beetl is a sharp project, better than Java HTML template engines, and it mentions the library ANTLR like a compiler.

It's a advanced topic, I don't think I can handle it well.

However, I'm considering to put this problem on other hand, This is a question about how to implement your own DSL.

At this point, dropincc.java, a small parser generator, comes into my eyes, and the author says, it ships with a template engine that can be used to generatetemplate engine, which is exactly what I need. But I can't find its implementation in the project!

So, The ANTLR's StringTemplate is the best choice. StringTemplate seems to be the only choice.