org.komapper.dialect.sqlserver.jdbc.SqlServerJdbcDialect.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of komapper-dialect-sqlserver-jdbc Show documentation
Show all versions of komapper-dialect-sqlserver-jdbc Show documentation
Komapper SQL Server Dialect for JDBC
package org.komapper.dialect.sqlserver.jdbc
import org.komapper.dialect.sqlserver.SqlServerDialect
import org.komapper.jdbc.JdbcDialect
import java.sql.SQLException
interface SqlServerJdbcDialect : SqlServerDialect, JdbcDialect {
override fun isUniqueConstraintViolationError(exception: SQLException): Boolean {
return exception.filterIsInstance().any {
it.errorCode == SqlServerDialect.UNIQUE_CONSTRAINT_VIOLATION_ERROR_CODE
}
}
override fun isSequenceExistsError(exception: SQLException): Boolean {
return exception.filterIsInstance().any {
it.errorCode == SqlServerDialect.OBJECT_ALREADY_EXISTS_ERROR_CODE
}
}
override fun isTableExistsError(exception: SQLException): Boolean {
return exception.filterIsInstance().any {
it.errorCode == SqlServerDialect.OBJECT_ALREADY_EXISTS_ERROR_CODE
}
}
override fun supportsBatchExecutionReturningGeneratedValues(): Boolean = false
}
private object SqlServerJdbcDialectImpl : SqlServerJdbcDialect
fun SqlServerJdbcDialect(): SqlServerJdbcDialect {
return SqlServerJdbcDialectImpl
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy