Just building a custom SQL dsl for fun.
Focus and persistence.
<dependency>
<groupId>io.delta</groupId>
<artifactId>datase</artifactId>
<version>0.1.4</version>
</dependency>
- IntelliJ IDEA or any editor/IDE
- Java 11+
- Kotlin
fun main() {
println(
query {
select("id", "name")
from("users")
where {
"id" eq 1
}
}
)
}
fun main() {
println(
create("Users") {
with {
"Id" to "int not null identity"
"Name" to "varchar(255) null"
}
}
)
}
fun main() {
println(
update("Users") {
"name" eq "Helena"
where {
"id" id 1
}
}
)
}
fun main() {
println(
delete("Users") {
"id" eq 1
}
)
}