File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/puppetlabs/puppetdb/query_eng Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 5454; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5555; ;; Plan - functions/transformations of the internal query plan
5656
57- (defn validate-dotted-field
58- [dotted-field]
59- ; ; Q: why isn't parameters in here (cf. :dotted-fields below)
60- (and (string? dotted-field) (re-find #"^(facts|trusted)\. .+" dotted-field)))
61-
6257(def field-schema (s/cond-pre s/Keyword
6358 SqlCall SqlRaw
6459 {:select s/Any s/Any s/Any}))
18661861 [node]
18671862 (cm/match [node]
18681863
1869- [[(op :guard #{" =" " >" " <" " <=" " >=" " ~" }) (column :guard validate-dotted-field) value]]
1864+ [[(op :guard #{" =" " >" " <" " <=" " >=" " ~" })
1865+ ; ; Q: why isn't "parameters" included in the guard set
1866+ ; ; (cf. :dotted-fields below)?
1867+ (column :guard #(and (string? %)
1868+ (#{" facts" " trusted" } (-> (parse/parse-field %)
1869+ first
1870+ :name ))))
1871+ value]]
18701872 ; ; (= :inventory (get-in (meta node) [:query-context :entity]))
18711873 (maybe-add-match-function-filter op column value)
18721874
You can’t perform that action at this time.
0 commit comments