Just another SQL query builder focused on Java legacy projects. You will not have to modify any of your existing code to start using this when adding new functionality in your project.
Load SqlQueryBuilder.jar as a library in your project
It's built on Java 6, so it will fit in most of your projects.
String builder = new SqlQueryBuilder();
String query = builder
.select()
.from("Users")
.innerJoin("Clients", "ClientID", "ID")
.whereEqual("LastName", "Doe")
.orderBy("FirstName")
.query();
String builder = new SqlQueryBuilder();
String query = builder
.update("Users")
.set("FirstName", "John")
.set("Age", 21)
.whereEqual("ID", 1)
.query();
String builder = new SqlQueryBuilder();
String query = builder
.insertInto("Users")
.value("FirstName", "John")
.value("LastName", "Doe")
.value("Age", 21)
.query();
String builder = new SqlQueryBuilder();
String query = builder
.delete("Users")
.whereEquals("ID", 1)
.query();
You have more examples in the test project.
No rules yet.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Avoid to write raw queries in old projects where no framework was used.
- Don't have to edit any other file except the one where you "want" to add functionality.