Queries for Trino using H2Templates, not Q-types

64 views
Skip to first unread message

Sergio Pérez Felipe

unread,
Nov 22, 2022, 8:55:55 AM11/22/22
to Querydsl
I'm trying to generate a query to use in Trino DB. I don't use Q-types. This is how I do a equals:

SQLQuery sqlQuery = new SQLQuery(new Configuration(H2Templates.builder().build()));

PathBuilder<SessionList> pathBuilder = new PathBuilder(SessionList.class, "session_list");

sqlQuery.where(pathBuilder.get("city", String.class).eq("Madrid"));

Variable sqlQuery.toString generates next string:

from dual where session_list.city = ?

But I want to create next one:

from dual where session_list.city = 'Madrid'

Thank you.


Confidentiality Notice: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  Additionally, this email and any files transmitted with it may not be disseminated, distributed or copied. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

https://exp-now.medallia.com/
 ​​ 
Reply all
Reply to author
Forward
0 new messages