File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed
ktorm-core/src/test/kotlin/org/ktorm
ktorm-support-postgresql/src/test/kotlin/org/ktorm/support/postgresql Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ package org.ktorm.support.postgresql
22
33import org.ktorm.BaseTest
44import org.ktorm.database.Database
5+ import org.ktorm.schema.Table
6+ import org.ktorm.schema.enum
7+ import org.ktorm.schema.int
58import org.testcontainers.containers.PostgreSQLContainer
69import 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}
Original file line number Diff line number Diff 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()
You can’t perform that action at this time.
0 commit comments