Support new versions of the deprecated functions
Ziaunys opened this issue · comments
I really like using the old deprecated functions that work with the v1 api because it provides a direct interface for querying PuppetDB instead of using the infix query language provided by this module. Is there any chance that this project would accept a PR adding a generic 'pdbquery' function that accepts the endpoint and query? I'd be glad to do the work. It would just be a nice alternative for those of us who like the S-expression query language.
Actually the new style functions will interpret the query as a raw API query if it isn't a string.
So stuff like query_nodes(["in","certname",["extract","certname",["select_resources",["and",["=","exported",false],["=","type","Class"],["=","title","Apache"]]]]])
works the same as query_nodes("class[apache]")
.
I think this is mentioned in the README but I can add some example of it as well to clarify it a bit more.