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

[QP, lib] Allow multiple arguments to :contains, :starts-with, etc. #41958

Merged
merged 1 commit into from
May 1, 2024

Commits on May 1, 2024

  1. [QP, lib] Allow multiple arguments to :contains, :starts-with, etc.

    These string matching clauses only allowed two arguments previously.
    Typically `[:contains field x]` to match a field against a literal.
    
    This adds similar desugaring for `:contains`, `:does-not-contain`,
    `:starts-with` and `:ends-with` that is currently done for
    multi-argument `:=` and `:!=`:
    
    ```clojure
    [:contains field x y z] ;; ->
    [:or [:contains field x] [:contains field y] [:contains field z]]
    
    [:does-not-contain field x y z] ;; ->
    [:and [:does-not-contain field x]
          [:does-not-contain field y]
          [:does-not-contain field z]]
    ```
    bshepherdson committed May 1, 2024
    Configuration menu
    Copy the full SHA
    fba27e4 View commit details
    Browse the repository at this point in the history