override fun setValue()

in exposed-r2dbc/src/main/kotlin/org/jetbrains/exposed/v1/r2dbc/mappers/PostgresSpecificTypeMapper.kt [45:67]


    override fun setValue(
        statement: Statement,
        dialect: DatabaseDialect,
        typeMapping: R2dbcTypeMapping,
        columnType: IColumnType<*>,
        value: Any?,
        index: Int
    ): Boolean {
        // Check if this is a JSON column type
        if (columnType !is JsonColumnMarker) {
            return false
        }

        if (value == null) {
            statement.bindNull(index - 1, Json::class.java)
            return true
        } else if (value is String) {
            statement.bind(index - 1, Json.of(value))
            return true
        }

        return false
    }