kotlin-jdsl
kotlin-jdsl copied to clipboard
jdsl selectFrom function
Backgrounds
-
queryDSL
has selectFrom function and users migrating from QueryDSL to Kotlin-JDSL are forced to use theselect()
from()
functions or develop anselectFrom
extension function and use
Requirements
- adding the 'selectFrom' function to the 'Jdsl' class makes it easier for people to use JDSL
Example
authorRepository.findAll {
selectFrom(
entity(Author::class),
leftJoin(BookAuthor::class).on(path(Author::authorId).equal(path(BookAuthor::authorId))),
).where(
path(BookAuthor::authorId).isNull(),
).orderBy(
path(Author::authorId).asc(),
)
}