Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Latest commit

 

History

History
29 lines (23 loc) · 970 Bytes

README.md

File metadata and controls

29 lines (23 loc) · 970 Bytes

JDrucker

Do what you do best, and outsource the rest. Make the Java do business logic only, make the SQL do data query and update. Don't let SQL statements get mixed up in Java code.

XSQL

The 'xsql' file is a grammatical structure. Let SQL statements, like Java code, has methods, comments, structures, and support dynamic parameter replaced.

Example In IntelliJ IDEA:

Maven:

<dependency>
    <groupId>com.github.braisdom</groupId>
    <artifactId>JDrucker</artifactId>
    <version>1.2.0</version>
</dependency>

Usage:

// Loading and caching all XSQL file at system beginning. The xsqlPath is resources path of application
JDrucker.loadXsqlFile(xsqlPath);
// Retrieving the xsql declaration from cache, and formatting the sql statment
XSQLDeclaration xsqlDeclaration = JDrucker.getXSQLDeclaration(xsqlFileName)

ORM with XSQL

Coming soon