|
@@ -1,6 +1,6 @@
|
|
|
package org.example.join.sql;
|
|
|
|
|
|
-import org.example.join.model.Table;
|
|
|
+import org.example.join.model.ITable;
|
|
|
import org.example.join.model.TableJoin;
|
|
|
|
|
|
public class From extends SqlWrapper {
|
|
@@ -12,19 +12,19 @@ public class From extends SqlWrapper {
|
|
|
this.sql = sql;
|
|
|
}
|
|
|
|
|
|
- public Join innerJoin(Table table) {
|
|
|
+ public Join innerJoin(ITable table) {
|
|
|
return join(SqlConstant.INNER_JOIN, table);
|
|
|
}
|
|
|
|
|
|
- public Join leftJoin(Table table) {
|
|
|
+ public Join leftJoin(ITable table) {
|
|
|
return join(SqlConstant.LEFT_JOIN, table);
|
|
|
}
|
|
|
|
|
|
- public Join rightJoin(Table table) {
|
|
|
+ public Join rightJoin(ITable table) {
|
|
|
return join(SqlConstant.RIGHT_JOIN, table);
|
|
|
}
|
|
|
|
|
|
- private Join join(String joinType, Table table) {
|
|
|
+ private Join join(String joinType, ITable table) {
|
|
|
TableJoin tableJoin = new TableJoin(joinType, table);
|
|
|
sql.queryTableList.add(tableJoin);
|
|
|
return new Join(this, tableJoin.getQueryConditionList());
|