puppetlabs/puppetdb — pull request #1053 by wkalt (2014-08-19 01:50:19+00:00)
Title: (PDB-821) Facilitate facts subqueries against fact nodes.

This patch modifies the v4 IN and EXTRACT operators to accept multiple fields at once.
This allows the following...

["and" ["in", "name",
["extract", "name", [select-fact-nodes ["=","value",10]]]]
["in", "certname",
["extract", "certname", [select-fact-nodes ["=", "value", 10]]]]]

to be re-written as

["in", ["name","certname"],
["extract", ["name", "certname"], ["select-fact-nodes", ["=", "value", 10]]]]

As written, this will affect in and extract for all v4 endpoints, while throwing an
exception on v2/v3 to explain that vector fields are not allowed.