Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@snimavat
Copy link
Contributor

@basejump

Trying to get "in" subquery working : i wanted to use it here

@basejump basejump marked this pull request as draft July 11, 2023 15:11
@snimavat
Copy link
Contributor Author

snimavat commented Jul 13, 2023

The goal of this PR is to get subqueries working as closure, and we should be able to deep props with dots in subquery

Eg this kind of queries as below

I wanted to use it like

CustFamily.query {                  
      or {
          eq "parent.id", eldestParent.id //All uncles
          "in" "parent.id", {
               eq "parent.id", eldestParent.id
               projections { property("child.id")
          }
      }
}

which is equivalent to

List<Long> uncles = CustFamily.query("parent.id": eldestParent.id).projections { property("child.id")}.list() as List<Long>
CustFamily.query {         
    or {         
             eq "parent.id", eldestParent.id //All uncles
              inList("parent.id", uncles) //childs of uncles                    
          }
    }

@snimavat snimavat marked this pull request as ready for review July 13, 2023 14:57
Base automatically changed from dev to master August 9, 2023 23:01
@basejump basejump marked this pull request as draft August 27, 2023 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants