https://github.com/3dcitydb/sqlbuilder
Dynamic SQL builder for the 3D City Database
https://github.com/3dcitydb/sqlbuilder
Last synced: 6 months ago
JSON representation
Dynamic SQL builder for the 3D City Database
- Host: GitHub
- URL: https://github.com/3dcitydb/sqlbuilder
- Owner: 3dcitydb
- License: apache-2.0
- Created: 2018-01-25T21:25:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2026-01-26T15:06:57.000Z (6 months ago)
- Last Synced: 2026-01-26T22:42:28.191Z (6 months ago)
- Language: Java
- Size: 720 KB
- Stars: 1
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqlbuilder
Dynamic SQL builder for the 3D City Database
```sql
select
*
from
author a
join book b on a.id = b.author_id
where
a.year_of_birth > 1920
and a.first_name = 'Paulo'
order by
a.title
```
```java
Table author = Table.of("author");
Table book = Table.of("book");
Select select = Select.newInstance()
.from(author)
.join(book).on(author.column("id").eq(book.column("author_id")))
.where(author.column("year_of_birth").gt(1920)
.and(author.column("first_name").eq("Paulo")))
.orderBy(author.column("title"));
System.out.println(
select.toSql(SqlBuildOptions.defaults().setIndent(" ")));
```