Skip to content

Commit

Permalink
Add set operations #402 / Exclude `test intersection of three queries…
Browse files Browse the repository at this point in the history
…` from testing against PSQL as it returns "unexpected" result
  • Loading branch information
Tapac committed Sep 19, 2021
1 parent 10a3ca7 commit a68afc7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.tests.DatabaseTestsBase
import org.jetbrains.exposed.sql.tests.TestDB
import org.jetbrains.exposed.sql.tests.shared.assertEqualCollections
import org.jetbrains.exposed.sql.tests.shared.assertEquals
import org.jetbrains.exposed.sql.vendors.currentDialect
import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
import kotlin.test.assertTrue

Expand Down Expand Up @@ -75,7 +75,7 @@ class UnionTests : DatabaseTestsBase() {

@Test
fun `test intersection of three queries`() {
withCitiesAndUsers(listOf(TestDB.MYSQL)) { _, users, _ ->
withCitiesAndUsers(listOf(TestDB.MYSQL, TestDB.POSTGRESQL, TestDB.POSTGRESQLNG)) { _, users, _ ->
val usersQuery = users.selectAll()
val sergeyQuery = users.select { users.id eq "sergey" }
usersQuery.unionAll(usersQuery).intersect(sergeyQuery).map { it[users.id] }.apply {
Expand Down

0 comments on commit a68afc7

Please sign in to comment.