Skip to content

Commit

Permalink
fix: modify comment & method name
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgolf committed Feb 9, 2024
1 parent f6530a7 commit 5c5137d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ object Expressions {
}

/**
* Creates an expression that represents the local datetime in jpql.
* Creates an expression that represents the local datetime.
*/
@SinceJdsl("3.4.0")
fun localDateTime(): Expression<LocalDateTime> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ class ExpressionsTest : WithAssertions {
}

@Test
fun `localDateTime to support LOCAL DATETIME in jpql`() {
fun localDateTime() {
// when
val actual = Expressions.localDateTime()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.linecorp.kotlinjdsl.render.jpql.serializer.impl
import com.linecorp.kotlinjdsl.Internal
import com.linecorp.kotlinjdsl.querymodel.jpql.expression.impl.JpqlLocalDateTime
import com.linecorp.kotlinjdsl.render.RenderContext
import com.linecorp.kotlinjdsl.render.jpql.serializer.JpqlRenderSerializer
import com.linecorp.kotlinjdsl.render.jpql.serializer.JpqlSerializer
import com.linecorp.kotlinjdsl.render.jpql.writer.JpqlWriter
import kotlin.reflect.KClass
Expand All @@ -16,12 +15,6 @@ class JpqlLocalDateTimeSerializer : JpqlSerializer<JpqlLocalDateTime> {
}

override fun serialize(part: JpqlLocalDateTime, writer: JpqlWriter, context: RenderContext) {
val delegate = context.getValue(JpqlRenderSerializer)

writer.write("LOCAL DATETIME")

writer.writeParentheses {
delegate.serialize(part, writer, context)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ class JpqlJpqlLocalDateTimeSerializerTest {
// then
verifySequence {
writer.write("LOCAL DATETIME")
writer.writeParentheses(any())
serializer.serialize(part, writer, context)
}
}
}

0 comments on commit 5c5137d

Please sign in to comment.