<@U07QUFYG6N4> You're right to fear that change, b...
# openvox
a
@Nick Burgan You're right to fear that change, but it looks to be OK. I approved and rebased it so it should be merged shortly. Honeysql used to do zero quoting itself, which seemed wild for an SQL query generator... For context what I did was enable
log-queries = true
in the puppetdb section of the conf file (in the sandbox script I use it's just
pdb edit
). Then (also with my custom script) you can
pdb run
a local openvoxdb, and send a query to it
Copy code
pdb aq -- '["from","inventory",["extract",["facts.sne'"'"'aky\"fact"],["=","node_state","active"],["group_by","facts.sne'"'"'aky\"fact"]]]'
and then the logs will have the SQL string generated.
Copy code
"... SELECT (fs.stable || fs.volatile) -> 'sne''aky\"fact' AS \"facts.sne'aky\"\"fact\" FROM factsets AS fs LEFT JOIN certnames ON fs.certname = certnames.certname WHERE NOT ((certnames.certname) IN (SELECT certname FROM (SELECT not_active_nodes.certname AS \"certname\" FROM not_active_nodes) AS sub)) GROUP BY \"facts.sne'aky\"\"fact\""
all three locations in there look properly escaped still.
popcornparrot 2