SonarCloud results:
The Exasol SQL Statement Builder abstracts programmatic creation of SQL statements and is intended to replace ubiquitous string concatenation solutions which make the code hard to read and are prone to error and security risks.
Goals:
- Foster clean and readable code
- Allow for thorough validation of dynamic parts
- Detect as many errors as possible at compile time
- Don't repeat yourself (DRY)
- Allow extension for different SQL dialects
The following example gives you an idea about what you can do with the SQL Statement Builder. Check our user guide for more details.
final Select select = StatementFactory.getInstance().select() //
.field("fieldA", "tableA.fieldB", "tableB.*");
select.from().table("schemaA.tableA");
select.limit(10);
final StringRendererConfig config = StringRendererConfig.builder().quoteIdentifiers(true).build();
final SelectRenderer renderer = new SelectRenderer(config);
select.accept(renderer);
final String sql = renderer.render();
"Users" from the perspective of the sql-statement-builder
are developers integrating the module into their own software.
Dependency | Purpose | License |
---|---|---|
Apache Maven | Build tool | Apache License 2.0 |
Equals Verifier | Automatic contract checker for equals() and hash() |
Apache License 2.0 |
Hamcrest | Advanced matchers for JUnit | GNU BSD-3-Clause |
JUnit 5 | Unit testing framework | Eclipse Public License 1.0 |
Mockito | Mocking framework | MIT License |
Plug-in | Purpose | License |
---|---|---|
Maven Compiler Plugin | Setting required Java version | Apache License 2.0 |
Maven GPG Plugin | Signs JARs | Apache License 2.0 |
Maven Enforcer Plugin | Controlling environment constants | Apache License 2.0 |
Maven Jacoco Plugin | Code coverage metering | Eclipse Public License 2.0 |
Maven JavaDoc Plugin | Creates JavaDoc JARs | Apache License 2.0 |
Maven Source Plugin | Creates source JARs | Apache License 2.0 |
Maven Surefire Plugin | Unit testing | Apache License 2.0 |
OFT Maven Plugin | Requirement tracing | GPL 3.0 |
Sonatype OSS Index Maven Plugin | Checking Dependencies Vulnerability | ASL2 |
Versions Maven Plugin | Checking if dependencies updates are available | Apache License 2.0 |