Skip to content

Commit

Permalink
Compilation fix after merge with master / #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapac committed Nov 1, 2017
1 parent 36ec2e4 commit c5dfde5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/org/jetbrains/exposed/sql/Queries.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fun <Key:Any, T: IdTable<Key>> T.insertAndGetId(ignore: Boolean = false, body: T
fun <T:Table, E:Any> T.batchInsert(data: Iterable<E>, ignore: Boolean = false, body: BatchInsertStatement.(E)->Unit): List<Map<Column<*>, Any>> {
if (data.count() == 0) return emptyList()
fun newBatchStatement() : BatchInsertStatement {
return if (currentDialect == SQLServerDialect && this.autoIncColumn != null) {
return if (currentDialect is SQLServerDialect && this.autoIncColumn != null) {
SQLServerBatchInsertStatement(this, ignore)
} else {
BatchInsertStatement(this, ignore)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal object SQLServerFunctionProvider : FunctionProvider() {
override fun random(seed: Int?) = if (seed != null) "RAND(${seed})" else "RAND(CHECKSUM(NEWID()))"
}

internal class SQLServerDialect() : VendorDialect("sqlserver", SQLServerDataTypeProvider, SQLServerFunctionProvider) {
internal class SQLServerDialect : VendorDialect(dialectName, SQLServerDataTypeProvider, SQLServerFunctionProvider) {
override val supportsIfNotExists = false
override val needsQuotesWhenSymbolsInNames = false

Expand All @@ -40,4 +40,7 @@ internal class SQLServerDialect() : VendorDialect("sqlserver", SQLServerDataType
""
} + " OFFSET $offset ROWS FETCH NEXT $size ROWS ONLY"
}
companion object {
const val dialectName = "sqlserver"
}
}

0 comments on commit c5dfde5

Please sign in to comment.