Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-163

Array/list support for "IN" operator for matching against a list of possible items

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDB 4.0.0
    • Component/s: None
    • Labels:

      Description

      When you have a array to match for it would be nice if you could use it directly with the in operator instead of having to do lots of 'or' statements.

      For example, if I want to fetch the facts foo1, foo2, foo3, foo4 & foo5 in the current API this needs:

      ["or", ["=", "name", "foo1"], ["=", "name", "foo2"], ["=", "name", "foo3"], ["=", "name", "foo4"], ["=", "name", "foo5"]]

      With a array/list operator this could instead be:

      ["in", "name", ["array", ["foo1", "foo2", "foo3", "foo4", "foo5"]]]

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                redmine.exporter redmine.exporter
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: