-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
198 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 53 additions & 53 deletions
106
...m/easy/query/core/expression/segment/condition/predicate/SQLNativeColumnSetPredicate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
package com.easy.query.core.expression.segment.condition.predicate; | ||
|
||
import com.easy.query.core.basic.jdbc.parameter.ToSQLContext; | ||
import com.easy.query.core.enums.SQLPredicateCompare; | ||
import com.easy.query.core.enums.SQLPredicateCompareEnum; | ||
import com.easy.query.core.expression.parser.core.available.TableAvailable; | ||
import com.easy.query.core.expression.segment.Column2Segment; | ||
import com.easy.query.core.expression.segment.impl.AbstractSQLNativeSegmentImpl; | ||
import com.easy.query.core.expression.segment.scec.context.core.SQLNativeExpression; | ||
import com.easy.query.core.expression.sql.builder.ExpressionContext; | ||
import com.easy.query.core.metadata.ColumnMetadata; | ||
import com.easy.query.core.util.EasySQLExpressionUtil; | ||
|
||
/** | ||
* create time 2023/8/5 12:27 | ||
* 文件说明 | ||
* | ||
* @author xuejiaming | ||
*/ | ||
public class SQLNativeColumnSetPredicate extends AbstractSQLNativeSegmentImpl implements Predicate { | ||
|
||
private final Column2Segment column2Segment; | ||
|
||
public SQLNativeColumnSetPredicate(Column2Segment column2Segment, ExpressionContext expressionContext, String sqlSegment, SQLNativeExpression sqlNativeExpression) { | ||
super(expressionContext, sqlSegment, sqlNativeExpression); | ||
this.column2Segment = column2Segment; | ||
} | ||
|
||
@Override | ||
public TableAvailable getTable() { | ||
return column2Segment.getTable(); | ||
} | ||
|
||
@Override | ||
public String getPropertyName() { | ||
return column2Segment.getColumnMetadata().getPropertyName(); | ||
} | ||
|
||
@Override | ||
public Predicate cloneSQLColumnSegment() { | ||
return new SQLNativeColumnSetPredicate(column2Segment,expressionContext,sqlSegment, sqlNativeExpression); | ||
} | ||
|
||
@Override | ||
public SQLPredicateCompare getOperator() { | ||
return SQLPredicateCompareEnum.EQ; | ||
} | ||
|
||
@Override | ||
public String toSQL(ToSQLContext toSQLContext) { | ||
return column2Segment.toSQL(toSQLContext) +" "+getOperator().getSQL()+" "+ super.toSQL(toSQLContext); | ||
} | ||
} | ||
//package com.easy.query.core.expression.segment.condition.predicate; | ||
// | ||
//import com.easy.query.core.basic.jdbc.parameter.ToSQLContext; | ||
//import com.easy.query.core.enums.SQLPredicateCompare; | ||
//import com.easy.query.core.enums.SQLPredicateCompareEnum; | ||
//import com.easy.query.core.expression.parser.core.available.TableAvailable; | ||
//import com.easy.query.core.expression.segment.Column2Segment; | ||
//import com.easy.query.core.expression.segment.impl.AbstractSQLNativeSegmentImpl; | ||
//import com.easy.query.core.expression.segment.scec.context.core.SQLNativeExpression; | ||
//import com.easy.query.core.expression.sql.builder.ExpressionContext; | ||
//import com.easy.query.core.metadata.ColumnMetadata; | ||
//import com.easy.query.core.util.EasySQLExpressionUtil; | ||
// | ||
///** | ||
// * create time 2023/8/5 12:27 | ||
// * 文件说明 | ||
// * | ||
// * @author xuejiaming | ||
// */ | ||
//public class SQLNativeColumnSetPredicate extends AbstractSQLNativeSegmentImpl implements Predicate { | ||
// | ||
// private final Column2Segment column2Segment; | ||
// | ||
// public SQLNativeColumnSetPredicate(Column2Segment column2Segment, ExpressionContext expressionContext, String sqlSegment, SQLNativeExpression sqlNativeExpression) { | ||
// super(expressionContext, sqlSegment, sqlNativeExpression); | ||
// this.column2Segment = column2Segment; | ||
// } | ||
// | ||
// @Override | ||
// public TableAvailable getTable() { | ||
// return column2Segment.getTable(); | ||
// } | ||
// | ||
// @Override | ||
// public String getPropertyName() { | ||
// return column2Segment.getColumnMetadata().getPropertyName(); | ||
// } | ||
// | ||
// @Override | ||
// public Predicate cloneSQLColumnSegment() { | ||
// return new SQLNativeColumnSetPredicate(column2Segment,expressionContext,sqlSegment, sqlNativeExpression); | ||
// } | ||
// | ||
// @Override | ||
// public SQLPredicateCompare getOperator() { | ||
// return SQLPredicateCompareEnum.EQ; | ||
// } | ||
// | ||
// @Override | ||
// public String toSQL(ToSQLContext toSQLContext) { | ||
// return column2Segment.toSQL(toSQLContext) +" "+getOperator().getSQL()+" "+ super.toSQL(toSQLContext); | ||
// } | ||
//} |
62 changes: 31 additions & 31 deletions
62
...a/com/easy/query/core/expression/segment/condition/predicate/SQLNativePredicate2Impl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
package com.easy.query.core.expression.segment.condition.predicate; | ||
|
||
import com.easy.query.core.enums.SQLPredicateCompare; | ||
import com.easy.query.core.expression.segment.SQLSegment; | ||
import com.easy.query.core.expression.segment.impl.AbstractSQLNativeSegment2Impl; | ||
import com.easy.query.core.expression.segment.scec.context.core.SQLNativeExpression; | ||
import com.easy.query.core.expression.sql.builder.ExpressionContext; | ||
|
||
import java.util.function.Function; | ||
|
||
/** | ||
* create time 2023/7/30 21:06 | ||
* 文件说明 | ||
* | ||
* @author xuejiaming | ||
*/ | ||
public class SQLNativePredicate2Impl extends AbstractSQLNativeSegment2Impl implements Predicate { | ||
public SQLNativePredicate2Impl(ExpressionContext expressionContext, SQLSegment sqlSegment, Function<String, String> sqlSegmentFunction, SQLNativeExpression sqlNativeExpression) { | ||
super(expressionContext, sqlSegment,sqlSegmentFunction, sqlNativeExpression); | ||
} | ||
|
||
@Override | ||
public Predicate cloneSQLColumnSegment() { | ||
return new SQLNativePredicate2Impl(expressionContext,sqlSegment,sqlSegmentFunction, sqlNativeExpression); | ||
} | ||
|
||
@Override | ||
public SQLPredicateCompare getOperator() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
} | ||
//package com.easy.query.core.expression.segment.condition.predicate; | ||
// | ||
//import com.easy.query.core.enums.SQLPredicateCompare; | ||
//import com.easy.query.core.expression.segment.SQLSegment; | ||
//import com.easy.query.core.expression.segment.impl.AbstractSQLNativeSegment2Impl; | ||
//import com.easy.query.core.expression.segment.scec.context.core.SQLNativeExpression; | ||
//import com.easy.query.core.expression.sql.builder.ExpressionContext; | ||
// | ||
//import java.util.function.Function; | ||
// | ||
///** | ||
// * create time 2023/7/30 21:06 | ||
// * 文件说明 | ||
// * | ||
// * @author xuejiaming | ||
// */ | ||
//public class SQLNativePredicate2Impl extends AbstractSQLNativeSegment2Impl implements Predicate { | ||
// public SQLNativePredicate2Impl(ExpressionContext expressionContext, SQLSegment sqlSegment, Function<String, String> sqlSegmentFunction, SQLNativeExpression sqlNativeExpression) { | ||
// super(expressionContext, sqlSegment,sqlSegmentFunction, sqlNativeExpression); | ||
// } | ||
// | ||
// @Override | ||
// public Predicate cloneSQLColumnSegment() { | ||
// return new SQLNativePredicate2Impl(expressionContext,sqlSegment,sqlSegmentFunction, sqlNativeExpression); | ||
// } | ||
// | ||
// @Override | ||
// public SQLPredicateCompare getOperator() { | ||
// throw new UnsupportedOperationException(); | ||
// } | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.