diff options
Diffstat (limited to 'lib/oxidized/source/sql.rb')
-rw-r--r-- | lib/oxidized/source/sql.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/oxidized/source/sql.rb b/lib/oxidized/source/sql.rb index 13fc39b..7e2824d 100644 --- a/lib/oxidized/source/sql.rb +++ b/lib/oxidized/source/sql.rb @@ -18,11 +18,12 @@ class SQL < Source end end - def load + def load node_want=nil nodes = [] 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) query.each do |node| # map node parameters keys = {} |