All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.komapper.dialect.postgresql.r2dbc.PostgreSqlR2dbcDialect.kt Maven / Gradle / Ivy

There is a newer version: 5.0.0
Show newest version
package org.komapper.dialect.postgresql.r2dbc

import io.r2dbc.spi.R2dbcException
import org.komapper.dialect.postgresql.PostgreSqlDialect
import org.komapper.r2dbc.Binder
import org.komapper.r2dbc.IndexedBinder
import org.komapper.r2dbc.R2dbcDialect

interface PostgreSqlR2dbcDialect : PostgreSqlDialect, R2dbcDialect {

    override fun getBinder(): Binder {
        return IndexedBinder
    }

    override fun isUniqueConstraintViolationError(exception: R2dbcException): Boolean {
        return exception.sqlState == PostgreSqlDialect.UNIQUE_CONSTRAINT_VIOLATION_STATE_CODE
    }

    override fun supportsBatchExecutionOfParameterizedStatement(): Boolean = false
}

private object PostgreSqlR2dbcDialectImpl : PostgreSqlR2dbcDialect

fun PostgreSqlR2dbcDialect(): PostgreSqlR2dbcDialect {
    return PostgreSqlR2dbcDialectImpl
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy