Skip to content

Commit acdd4a2

Browse files
committed
Coverage
1 parent c48a1d2 commit acdd4a2

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/test/kotlin/examples/kotlin/mybatis3/canonical/PersonMapperTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ class PersonMapperTest {
456456
newSession().use { session ->
457457
val mapper = session.getMapper(PersonMapper::class.java)
458458

459-
val rows = mapper.count { allRows() }
459+
val rows = mapper.count { allRows() }
460460

461461
assertThat(rows).isEqualTo(6L)
462462
}

src/test/kotlin/examples/kotlin/mybatis3/general/GeneralKotlinTest.kt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,24 @@ class GeneralKotlinTest {
572572
}
573573
}
574574

575+
@Test
576+
fun testRawSelectWithGroupBy() {
577+
578+
val ss = select(lastName, count())
579+
.from(Person) {
580+
where(firstName, isNotEqualTo("Bamm Bamm"))
581+
groupBy(lastName)
582+
orderBy(lastName)
583+
}
584+
585+
val expected = "select last_name, count(*) from Person " +
586+
"where first_name <> #{parameters.p1,jdbcType=VARCHAR} " +
587+
"group by last_name " +
588+
"order by last_name"
589+
590+
assertThat(ss.selectStatement).isEqualTo(expected)
591+
}
592+
575593
@Test
576594
fun testRawUpdate1() {
577595
newSession().use { session ->

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy