Skip to content

Commit 658ab52

Browse files
fix tests
1 parent d79ffad commit 658ab52

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

ktorm-core/src/main/kotlin/org/ktorm/expression/SqlFormatter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public abstract class SqlFormatter(
268268
write("${expr.name.quoted} ")
269269

270270
if (expr.tableAlias != null && expr.tableAlias.isNotBlank()) {
271-
writeKeyword("as ")
271+
// writeKeyword("as ")
272272
write("${expr.tableAlias.quoted} ")
273273
}
274274

ktorm-support-oracle/src/test/kotlin/org/ktorm/support/oracle/OracleTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class OracleTest : BaseTest() {
148148
}
149149

150150
@Test
151-
fun testSelctForUpdate() {
151+
fun testSelectForUpdate() {
152152
database.useTransaction(isolation = TransactionIsolation.SERIALIZABLE) {
153153
val employee = database
154154
.sequenceOf(Employees, withReferences = false)

ktorm-support-sqlserver/src/test/kotlin/org/ktorm/support/sqlserver/SqlServerTest.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,11 @@ class SqlServerTest : BaseTest() {
238238
assert("too long" in e.message!!)
239239
}
240240
}
241+
242+
@Test
243+
fun testSequence() {
244+
for (employee in database.employees) {
245+
println(employee)
246+
}
247+
}
241248
}

ktorm-support-sqlserver/src/test/resources/init-sqlserver-data.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
create table t_department(
33
id int not null identity(1, 1),
44
name varchar(128) not null,
5-
location varchar(128) not null
5+
location varchar(128) not null,
6+
mixedCase varchar(128)
67
);
78

89
create table t_employee(

0 commit comments

Comments
 (0)