Closed shouwn closed 8 months ago
I have some question before working on this issue. I would like to confirm if I understood the issue correctly.
The following changes are needed.
Jpql.kt
inline fun <DSL : JpqlDsl, Q : JpqlQuery<Q>> jpql(jpql: DSL, init: DSL.() -> JpqlQueryable<Q>): Q {
return jpql.init().toQuery()
}
KotlinJdslJpqlExecutor.kt (one of support modules)
fun <T : Any, DSL : JpqlDsl> findAll(
dsl: DSL,
init: DSL.() -> JpqlQueryable<SelectQuery<T>>,
): List<T?>
// and other methods and modules
After, the user can register custom beans in Spring as follows:
@Component
class MyJpql(
private val encryptor: Encryptor,
) : Jpql() {
fun myFunction(value: String): Expression<String> {
val encrypted = encryptor.encrypt(value)
return function(String::class, "myFunction", listOf(value(encrypted)))
}
}
If this is right, I would like to take this issue.
@jbl428 Oh, I'm so sorry.... I wasn't notified of this issue and didn't realize you had commented.
You're right. If you're still interested in working on this, please comment again.
I'm really sorry for this late response... 😢
@shouwn It's okay. I'm glad that I understood correctly. 😄 I want to take on this task.
I appreciate your thoughtfulness. I have changed the assignee to you.
Backgrounds
JpqlDsl
.JpqlDsl
object is to implement theJpqlDsl.Constructor
interface.JpqlDsl
.Objects
Benefits
JpqlSerializer
.Requirements
Contribution