编译器Translator类增加了对表比较、表合并的getChFromStr()方法,代码见如下:
/**
* 获取FROM子句的查询语句
* @return String FROM子句的查询语句
*/
public String getChFromStr(){
String rValue = "";
if (model instanceof TableCompareModel || model instanceof TableUnionModel){
QueryModel[] tableModelArr = model.getModelsFromAllChildrenByClass(TableModel.class);
if (tableModelArr.length > 0){
rValue = tableModelArr[0].getChString();
for (int i = 1; i < tableModelArr.length; i++){
rValue += ", " + tableModelArr[i].getChString();
}
}
}else{
if (model.getFirstModelByClass(TableListModel.class) != null)
rValue = (model.getFirstModelByClass(TableListModel.class)).getChString();
}
return rValue;
}
posted on 2007-04-13 14:19
LORD BLOG 阅读(162)
评论(0) 编辑 收藏 所属分类:
工作日志