diff --git a/src/main/java/com/loafle/overflow/crawler/sql/SQLCrawler.java b/src/main/java/com/loafle/overflow/crawler/sql/SQLCrawler.java index 996a004..def016e 100644 --- a/src/main/java/com/loafle/overflow/crawler/sql/SQLCrawler.java +++ b/src/main/java/com/loafle/overflow/crawler/sql/SQLCrawler.java @@ -1,6 +1,7 @@ package com.loafle.overflow.crawler.sql; import com.loafle.overflow.crawler.Crawler; +import com.loafle.overflow.crawler.config.Config; import java.sql.*; import java.util.ArrayList; @@ -16,24 +17,25 @@ public class SQLCrawler extends Crawler { public SQLCrawler() {} @Override - public Object getInternal(Map config) { + public Object getInternal(Config config) { return getMetrics(config); } - private Object getMetrics(Map config) { + private Object getMetrics(Config config) { Connection conn = null; Statement stmt = null; ResultSet rs = null; try { - conn = DriverManager.getConnection( - (String)config.get("url"), - (String)config.get("user"), - (String)config.get("pw")); +// conn = DriverManager.getConnection( +// (String)config.get("url"), +// (String)config.get("user"), +// (String)config.get("pw")); + stmt = conn.createStatement(); - rs = stmt.executeQuery((String)config.get("query")); +// rs = stmt.executeQuery((String)config.get("query")); ResultSetMetaData md = rs.getMetaData(); int cnt = md.getColumnCount();