简体   繁体   English

我如何使用 querydsl 执行此操作?

[英]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我有这部分查询,我正在将其转换为 querydsl,我想知道是否有办法实现这种转换

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你正在使用querydsl-sql
  • In the sql provided ||在sql提供|| is concatenation是连接
  • id and client_id are numbers idclient_id是数字
  • is_open and is_available are strings is_openis_available是字符串
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))));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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