Questions tagged [querydsl]

Querydsl is a framework which enables the construction of type-safe SQL-like queries for multiple backends including JPA, MongoDB and SQL in Java.

Querydsl is a framework which enables the construction of type-safe SQL-like queries for multiple backends including , and in .

Instead of writing queries as inline strings or externalizing them into XML files they are constructed via a fluent API.

1985 questions
0
votes
0 answers

Need to write DSL to check if these 4 events occur within 1 second in Elasticsearch

1. 31628 2021-02-13T00:20:49.325893Z - xyz all/repos open 2. 31628 2021-02-13T00:20:49.607437Z - xyz all/repos get-latest 3. 31628 2021-02-13T00:20:49.888794Z - xyz all/repos reparent 4. 31628 2021-02-13T00:20:50.170101Z - xyz all/repos stat I…
0
votes
1 answer

QueryDsl - Exclude results based on nested array contents

I'm trying to get all Posts which don't contain certain category using QueryDsl My models are defined as: Post @QueryEntity @Table(name = "posts") public class PostEntity implements { @Id @Column(name = "id") private String id; …
Alex
  • 923
  • 9
  • 21
0
votes
0 answers

how to write alternative query for listagg using querydsl

I wrote query DSL DB query for below Oracle SQL query, it was working fine but when result string too long than 4000 it gives me an error, so I was found another way to do that, it is attached below and I need to write that query using query DSL and…
Manoj Madushanka
  • 371
  • 1
  • 7
  • 21
0
votes
1 answer

Filtering DSL Query Search - Elasticsearch

I was reading a few articles and documents over query context and filter context and learned that it is always best to use filter context if you do not need to do a full text search or scoring does not matter. In my case, I am wanting to return the…
NoviceCoder
  • 449
  • 1
  • 9
  • 26
0
votes
1 answer

QueryDsl - Create a predicate to check if localdate is part of the current week

My goal is to check if a LocalDate is part of the current week. Similar examples for year and month startDate.month().eq(LocalDate.now().getMonthValue()); startDate.year().eq(LocalDate.now().getYear()); Ex 1 : 10 - Jun - 2021 (current day) is part…
0
votes
1 answer

How to return subquery as numberExpression in querydsl

Not error] NumberExpression print = smfpHistory.appType.when("Print").then(1).otherwise(0); error 1] NumberExpression print =…
0
votes
1 answer

Elasticsearch find match document base on number of properties

I have some docs in elastic search doc1 -> name: name1 doc2 -> name: name1, otherprop: prop1 doc3 -> name: name1, otherprop: prop1, otherprop2: prop2 My goal is get doc1 by name but the query return all three docs I tried to get doc1 by name…
user1392853
  • 269
  • 1
  • 6
  • 19
0
votes
2 answers

Query for an item inside of Fields - DSL Query

I read on this article elasticsearch query and match query to be able to query for ElasticApmTraceId that has a specific ID throughout my entire logs. So I attempted to do the following just to get ElasticApmTraceID: GET…
NoviceCoder
  • 449
  • 1
  • 9
  • 26
0
votes
1 answer

Search match multiple values in single field in Elasticsearch

I'm using Elasticsearch for search for all document has string REQUEST and partnerId=2960 and customerId= in message field I'm using this query but nothing return { "query": { "bool": { "must": [ { "match_phrase": { …
0
votes
1 answer

Elasticsearch Query DSL multiple "query"s

This works: { "query": { "constant_score": { "filter": { "bool": { "must": [ { "match_phrase": { "EventID": "4732" } } ] } } …
jamesdeluk
  • 186
  • 2
  • 16
0
votes
0 answers

can we assign 1 weight together for 2 conditions in elasticsearch

Weight 100 Weight 10 listen>10k listen>10k publish date>01/01/21 publish date>01/01/20 I tried adding weights separately for publish date but face a challenge when there is same amount of listens. Any help will be appreciated. Below…
0
votes
1 answer

JPA's Sort object with attributes in different table

TL;DR The question is: Is there a way to order a query in one table in regards to an attribute of a different table? Keep reading for more context In my project I have the following abstract class QueryParams: public abstract class QueryParams { …
0
votes
2 answers

How can i select a specific column of Entity Dynamically? JPA/querydsl

can i implement the following through querydsl or Spring Data JPA? I have a Table(Column: A,B,C) I want to select a specific column of Entity(Table) Specific columns are defined as List. (Each element matches column name) Thank you.
Keriel
  • 3
  • 3
0
votes
1 answer

Kotlin QueryDsl not generating Q classes

I'm using kts gradle with koltin. However when i try to add QueryDsl it's not genetation Q classes from my JPA entities. My build.gradle.kts looks like: plugins { id("org.springframework.boot") version "2.3.1.RELEASE" …
Yar Sol
  • 197
  • 2
  • 15
0
votes
1 answer

How to use mysql find_in_set function in querydsl?

Expressions.booleanTemplate("FIND_IN_SET({0}, {1})", path, param) It doesn't working. It cause Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected AST node: ( near line 3, column 18 [select task from com.simple.entity.Task…
1 2 3
99
100