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

Support all binding vars in SOSL queries #55

Merged
merged 2 commits into from
May 26, 2024

Conversation

adangel
Copy link
Contributor

@adangel adangel commented May 23, 2024

For the query

  FIND :myString1 IN ALL FIELDS
  RETURNING
     Account (Id, Name WHERE Name LIKE :myString2
              LIMIT :myInt3),
     Contact,
     Opportunity,
     Lead
  //WITH DIVISION =:myString4 // that's not supported by apex-parser yet
  WITH DIVISION = 'ccc'
  LIMIT :myInt5

the binding var myString2 wasn't detected, as the localExpressions of the WHERE clause where not traversed.

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to README are included in PR

For the query

      FIND :myString1 IN ALL FIELDS
      RETURNING
         Account (Id, Name WHERE Name LIKE :myString2
                  LIMIT :myInt3),
         Contact,
         Opportunity,
         Lead
      //WITH DIVISION =:myString4 // that's not supported by apex-parser yet
      WITH DIVISION = 'ccc'
      LIMIT :myInt5

the binding var `myString2` wasn't detected, as the localExpressions
of the `WHERE` clause where not traversed.
Copy link
Collaborator

@aaronhurst-google aaronhurst-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aaronhurst-google aaronhurst-google merged commit 742794a into google:main May 26, 2024
2 checks passed
@adangel adangel deleted the sosl-binding-vars branch June 6, 2024 13:14
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.

None yet

2 participants