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

Investigate use cases for nested query builders #515

Open
jakeboone02 opened this issue May 11, 2023 · 0 comments
Open

Investigate use cases for nested query builders #515

jakeboone02 opened this issue May 11, 2023 · 0 comments

Comments

@jakeboone02
Copy link
Member

jakeboone02 commented May 11, 2023

Example using v6.3.0: https://codesandbox.io/s/snowy-snow-ub85bl?file=/src/CustomRule.tsx

Based on this Discord chat.

image

Use cases

  • SQL EXISTS clauses

Misc. thoughts

  • Store the query from the nested query builder in the value property of the parent rule.
  • Nested query builders should inherit all props from their parent query builder by default?
  • Store additional/override props for the nested query builder in the nested property of fields or operators.
  • Trigger the display of a nested query builder based on truthiness of nested property, or maybe a new value source selection ("query"?).

Questions

  • What should formatQuery do with rules that have nested queries? Can they be integrated somehow like a sub-group, or would they always need a custom ruleProcessor?
    • Use case for EXISTS clauses would need some more thought. Initially:
      WHERE EXISTS (SELECT 1 FROM [???] WHERE [nested query rules here])
      --                   ^?       ^?         ^ the easy part, maybe
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

No branches or pull requests

1 participant