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

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@274 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-06-22 02:27:21 +00:00
parent b42fe2909d
commit e96cd02a8b
19 changed files with 89 additions and 52 deletions
@@ -22,7 +22,6 @@ public class TableStat {
public int getUpdateCount() {
return updateCount;
}
public void incrementUpdateCount() {
updateCount++;
@@ -35,7 +34,7 @@ public class TableStat {
public int getDeleteCount() {
return deleteCount;
}
public void incrementDeleteCount() {
this.deleteCount++;
}
@@ -43,7 +42,7 @@ public class TableStat {
public void setDeleteCount(int deleteCount) {
this.deleteCount = deleteCount;
}
public void incrementInsertCount() {
this.insertCount++;
}
@@ -74,6 +73,37 @@ public class TableStat {
return buf.toString();
}
public static class Name {
private String name;
public Name(String name){
this.name = name;
}
public String getName() {
return this.name;
}
public int hashCode() {
return this.name.toLowerCase().hashCode();
}
public boolean equals(Object o) {
if (!(o instanceof Name)) {
return false;
}
Name other = (Name) o;
return this.name.equalsIgnoreCase(other.name);
}
public String toString() {
return this.name;
}
}
public static class Column {
private String table;