Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for mango "in" with subquery #695

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

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.

1 participant