.
This commit is contained in:
@@ -148,14 +148,16 @@ public class ParseMysql implements Parser {
|
||||
if (!isEmpty.test(links)) {
|
||||
links.forEach(x -> {
|
||||
MetaTable rightTable = tables.get(metaTable.getAlias().equals(x.getTables()[0]) ? x.getTables()[1] : x.getTables()[0]);
|
||||
bufFrom.append(" left join ").append(rightTable.getCatalog()).append(".").append(rightTable.getName()).append(" ").append(rightTable.getAlias()).append(" on ");
|
||||
int tag = bufFrom.length();
|
||||
x.getLink().forEach((k,v) -> {
|
||||
if (bufFrom.length() > tag) {
|
||||
bufFrom.append(" and ");
|
||||
}
|
||||
bufFrom.append(k).append("=").append(v);
|
||||
});
|
||||
if (rightTable != null) {
|
||||
bufFrom.append(" left join ").append(rightTable.getCatalog()).append(".").append(rightTable.getName()).append(" ").append(rightTable.getAlias()).append(" on ");
|
||||
int tag = bufFrom.length();
|
||||
x.getLink().forEach((k, v) -> {
|
||||
if (bufFrom.length() > tag) {
|
||||
bufFrom.append(" and ");
|
||||
}
|
||||
bufFrom.append(k).append("=").append(v);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user