summaryrefslogtreecommitdiff
path: root/lib/oxidized/source
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/source')
-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 = {}