简体   繁体   中英

How can I do this using querydsl?

I have this part of my query which I'm transforming into querydsl and I would like to know if there's a way to achieve this transformation

Where...
...
and ce.id || ce.is_open not in (select fut_client.client_id || fut_client.is_available from future_client fut_client)")

Assumptions:

  • You're using querydsl-sql
  • In the sql provided || is concatenation
  • id and client_id are numbers
  • is_open and is_available are strings
query.where(someRelationalPathBase.something.eq(someRelationalPathBase.somethingElse)
            .and(ce.id.stringValue().concat(ci.isOpen())
            .notIn(SQLExpressions.select(futClient.clientId.stringValue().concat(futClient.isAvailable))
            .from(futClient))));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM