Skip to content

Commit cfddd98

Browse files
committed
Move table to PostgresBase
1 parent d9c0d6b commit cfddd98

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

ktorm-core/src/test/kotlin/org/ktorm/BaseTest.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,6 @@ abstract class BaseTest {
111111
val phoneNumber = varchar("phone_number").bindTo { it.phoneNumber }
112112
}
113113

114-
enum class Mood {
115-
HAPPY,
116-
SAD
117-
}
118-
119-
object TableWithEnum : Table<Nothing>("t_enum") {
120-
val id = int("id").primaryKey()
121-
val current_mood = enum<Mood>("current_mood")
122-
}
123-
124114
val Database.departments get() = this.sequenceOf(Departments)
125115

126116
val Database.employees get() = this.sequenceOf(Employees)

ktorm-support-postgresql/src/test/kotlin/org/ktorm/support/postgresql/BasePostgreSqlTest.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ package org.ktorm.support.postgresql
22

33
import org.ktorm.BaseTest
44
import org.ktorm.database.Database
5+
import org.ktorm.schema.Table
6+
import org.ktorm.schema.enum
7+
import org.ktorm.schema.int
58
import org.testcontainers.containers.PostgreSQLContainer
69
import kotlin.concurrent.thread
710

@@ -24,4 +27,14 @@ abstract class BasePostgreSqlTest : BaseTest() {
2427
Runtime.getRuntime().addShutdownHook(thread(start = false) { stop() })
2528
}
2629
}
30+
31+
enum class Mood {
32+
HAPPY,
33+
SAD
34+
}
35+
36+
object TableWithEnum : Table<Nothing>("t_enum") {
37+
val id = int("id").primaryKey()
38+
val current_mood = enum<Mood>("current_mood")
39+
}
2740
}

ktorm-support-postgresql/src/test/kotlin/org/ktorm/support/postgresql/FunctionsTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class FunctionsTest : BasePostgreSqlTest() {
4646
}
4747

4848
@Test
49-
fun testArrayPositionText() {
49+
fun testArrayPositionTextArray() {
5050
val namesSorted = database
5151
.from(Employees)
5252
.select()

0 commit comments

Comments
 (0)