Skip to content

Commit

Permalink
test: Add tests for eqSubQuery and notEqSubQuery operators
Browse files Browse the repository at this point in the history
  • Loading branch information
joc-a committed Jan 27, 2025
1 parent 48de924 commit 4464cb3
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,26 @@ class SelectTests : DatabaseTestsBase() {
}
}

@Test
fun testEqSubQuery() {
withCitiesAndUsers { _, _, userData ->
val query = userData.selectAll().where {
userData.value eqSubQuery userData.select(userData.value).where { userData.user_id eq "eugene" }
}
assertEquals(2, query.count())
}
}

@Test
fun testNotEqSubQuery() {
withCitiesAndUsers { _, _, userData ->
val query = userData.selectAll().where {
userData.value notEqSubQuery userData.select(userData.value).where { userData.user_id eq "sergey" }
}
assertEquals(3, query.count())
}
}

@Test
fun testLessSubQuery() {
withCitiesAndUsers { _, _, userData ->
Expand Down

0 comments on commit 4464cb3

Please sign in to comment.