Skip to content

Commit

Permalink
refactor: 优化
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed May 27, 2024
1 parent dd282ca commit ad29375
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
public class NotFillOrNullFragmentBuilder extends AbstractTermFragmentBuilder {

private final NullTermFragmentBuilder nullBuilder;
private final NullTermFragmentBuilder nullBuilder;
private final AbstractTermFragmentBuilder notBuilder;

public NotFillOrNullFragmentBuilder(AbstractTermFragmentBuilder notBuilder) {
Expand All @@ -36,12 +36,11 @@ public SqlFragments createFragments(String columnFullName,
SqlFragments notSqlFragments = notBuilder.createFragments(columnFullName, column, term);
SqlFragments nullSqlFragments = nullBuilder.createFragments(columnFullName, column, term);

return PrepareSqlFragments.of()
.addSql("(")
.addSql(nullSqlFragments.getSql())
.addSql("or")
.addSql(notSqlFragments.getSql())
.addSql(")")
.addParameter(notSqlFragments.getParameters());
return new BatchSqlFragments(5, 1)
.add(SqlFragments.LEFT_BRACKET)
.add(nullSqlFragments)
.add(SqlFragments.OR)
.add(notSqlFragments)
.add(SqlFragments.RIGHT_BRACKET);
}
}

0 comments on commit ad29375

Please sign in to comment.