Skip to content

kotlin Criteria.CriteriaStep.isEquals deprecation #405

@juan-medina

Description

@juan-medina

HI, I was looking at the Kotlin extensions Criteria.CriteriaStep.isEquals that now is deprecated

@Deprecated("Deprecated in favor of Spring Data Relational's Criteria")
infix fun Criteria.CriteriaStep.isEquals(value: Any): Criteria =
`is`(value)

I guess that is because org.springframework.data.r2dbc.query.Criteria is as well deprecated and we should use org.springframework.data.relational.core.query.Criteria instead, but I can not find and extension similar to the previous isEquals for Kotlin.

Before deprecation, I could do something like:

import org.springframework.data.r2dbc.core.from
import org.springframework.data.r2dbc.core.isEquals
import org.springframework.data.r2dbc.query.Criteria.where

....
    databaseClient
        .select().from<Foo>()
        .matching(where("id").isEquals("bar"))
        .fetch().one()

Now I need to do:

import org.springframework.data.r2dbc.core.from
import org.springframework.data.relational.core.query.Criteria.where

....
    databaseClient
        .select().from<Foo>()
        .matching(where("id").`is`("bar"))
        .fetch().one()

Maybe there are new extensions for org.springframework.data.relational.core.query.Criteria that I not aware of?

I can contribute with some, but that may imply dependency on the Kotlin runtime in spring-data-relational, maybe we should have something like https://github.com/reactor/reactor-kotlin-extensions ?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions