From 8e185c1003f0b7488c6b10997546390ebf5948d9 Mon Sep 17 00:00:00 2001 From: waahhh Date: Tue, 24 Oct 2023 04:13:59 +0900 Subject: [PATCH] feat(dsl): add dsl for lower function support --- .../com/linecorp/kotlinjdsl/dsl/jpql/Jpql.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dsl/jpql/src/main/kotlin/com/linecorp/kotlinjdsl/dsl/jpql/Jpql.kt b/dsl/jpql/src/main/kotlin/com/linecorp/kotlinjdsl/dsl/jpql/Jpql.kt index cc13dd2d2..ac7f37535 100644 --- a/dsl/jpql/src/main/kotlin/com/linecorp/kotlinjdsl/dsl/jpql/Jpql.kt +++ b/dsl/jpql/src/main/kotlin/com/linecorp/kotlinjdsl/dsl/jpql/Jpql.kt @@ -1042,6 +1042,22 @@ open class Jpql : JpqlDsl { return Expressions.type(path.toPath()) } + /** + * Creates an expression that represents the string in lowercase. + */ + @SinceJdsl("3.0.0") + fun lower(string: String): Expression { + return Expressions.lower(Expressions.value(string)) + } + + /** + * Creates an expression that represents the string in lowercase. + */ + @SinceJdsl("3.0.0") + fun lower(string: Expressionable): Expression { + return Expressions.lower(string.toExpression()) + } + /** * Creates an expression that represents the length of the string as an integer. */