修正运算符优先级别处理不当的问题

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@156 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-05-20 06:18:32 +00:00
parent ce32206d97
commit 107b62f003
7 changed files with 274 additions and 53 deletions
@@ -0,0 +1,37 @@
package com.alibaba.druid.sql;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import junit.framework.TestCase;
public class OnlineSQLTest extends TestCase {
private String url = "jdbc:mysql://10.20.129.146/dragoon_v25monitordb_online";
private String user = "dragoon";
private String password = "dragoon";
public void test_list_sql() throws Exception {
Connection conn = DriverManager.getConnection(url, user, password);
int count = 0;
String sql = "SELECT id, value FROM m_sql_const";
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
while (rs.next()) {
String value = rs.getString(2);
System.out.println(value);
System.out.println();
count++;
}
rs.close();
stmt.close();
System.out.println("COUNT : " + count);
conn.close();
}
}