diff --git a/render/jpql/src/main/kotlin/com/linecorp/kotlinjdsl/render/jpql/serializer/impl/JpqlFunctionSerializer.kt b/render/jpql/src/main/kotlin/com/linecorp/kotlinjdsl/render/jpql/serializer/impl/JpqlFunctionSerializer.kt index 0c16d99f2..c7d7d7a62 100644 --- a/render/jpql/src/main/kotlin/com/linecorp/kotlinjdsl/render/jpql/serializer/impl/JpqlFunctionSerializer.kt +++ b/render/jpql/src/main/kotlin/com/linecorp/kotlinjdsl/render/jpql/serializer/impl/JpqlFunctionSerializer.kt @@ -21,7 +21,9 @@ class JpqlFunctionSerializer : JpqlSerializer> { writer.write("FUNCTION") writer.writeParentheses { + writer.write("'") writer.write(part.name) + writer.write("'") if (IterableUtils.isNotEmpty(part.args)) { writer.write(",") diff --git a/render/jpql/src/test/kotlin/com/linecorp/kotlinjdsl/render/jpql/serializer/impl/JpqlFunctionSerializerTest.kt b/render/jpql/src/test/kotlin/com/linecorp/kotlinjdsl/render/jpql/serializer/impl/JpqlFunctionSerializerTest.kt index 7658f3579..301de64bf 100644 --- a/render/jpql/src/test/kotlin/com/linecorp/kotlinjdsl/render/jpql/serializer/impl/JpqlFunctionSerializerTest.kt +++ b/render/jpql/src/test/kotlin/com/linecorp/kotlinjdsl/render/jpql/serializer/impl/JpqlFunctionSerializerTest.kt @@ -59,7 +59,9 @@ class JpqlFunctionSerializerTest : WithAssertions { verifySequence { writer.write("FUNCTION") writer.writeParentheses(any()) + writer.write("'") writer.write(functionName1) + writer.write("'") writer.write(",") writer.write(" ") writer.writeEach(expressions, ", ", "", "", any()) @@ -86,7 +88,9 @@ class JpqlFunctionSerializerTest : WithAssertions { verifySequence { writer.write("FUNCTION") writer.writeParentheses(any()) + writer.write("'") writer.write(functionName1) + writer.write("'") } } }