添加SQL统计功能,统计SQL中所使用的表和字段

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@268 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-06-21 15:40:25 +00:00
parent 4f29345e6a
commit 597383d6af
3 changed files with 122 additions and 4 deletions
@@ -354,8 +354,8 @@ public class MySqlSchemaStatVisitor extends MySqlASTVisitorAdapter {
}
public int hashCode() {
int tableHashCode = table != null ? table.hashCode() : 0;
int nameHashCode = name != null ? name.hashCode() : 0;
int tableHashCode = table != null ? table.toLowerCase().hashCode() : 0;
int nameHashCode = name != null ? name.toLowerCase().hashCode() : 0;
return tableHashCode + nameHashCode;
}
@@ -376,7 +376,7 @@ public class MySqlSchemaStatVisitor extends MySqlASTVisitorAdapter {
return false;
}
} else {
if (!table.equals(column.getTable())) {
if (!table.equalsIgnoreCase(column.getTable())) {
return false;
}
}
@@ -386,7 +386,7 @@ public class MySqlSchemaStatVisitor extends MySqlASTVisitorAdapter {
return false;
}
} else {
if (!name.equals(column.getName())) {
if (!name.equalsIgnoreCase(column.getName())) {
return false;
}
}