summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlaf <neil@lathwood.co.uk>2017-11-10 14:44:45 +0000
committerlaf <neil@lathwood.co.uk>2017-11-10 14:44:45 +0000
commitd96cfac1f09ff4055f54ab604358290865d41f62 (patch)
tree2e306c714d2d3a963774b6d79ba767bdf14e8443 /lib
parent29704b5f2721a742d312ced784a8076e27e8063b (diff)
updated to check if node_want
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/source/sql.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/oxidized/source/sql.rb b/lib/oxidized/source/sql.rb
index 7e2824d..97064fa 100644
--- a/lib/oxidized/source/sql.rb
+++ b/lib/oxidized/source/sql.rb
@@ -23,7 +23,11 @@ class SQL < Source
db = connect
query = db[@cfg.table.to_sym]
query = query.with_sql(@cfg.query) if @cfg.query?
- query = qeury.where(@cfg.map.name.to_sym node_want)
+
+ if node_want
+ query = query.where(@cfg.map.name.to_sym=>node_want)
+ end
+
query.each do |node|
# map node parameters
keys = {}