Skip to content

Commit

Permalink
refactor: 优化native条件逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Jun 7, 2024
1 parent 9fbb780 commit 2ad7d62
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ protected SqlFragments createTermFragments(TableOrViewMetadata table, Term term)
}

public static SqlFragments createByTable(TableOrViewMetadata table, Term term) {
if (term.getValue() instanceof NativeSql) {
NativeSql sql = ((NativeSql) term.getValue());
return SimpleSqlFragments.of(sql.getSql(), sql.getParameters());
}

String columnName = term.getColumn();
if (columnName == null) {
if (term.getValue() instanceof NativeSql) {
NativeSql sql = ((NativeSql) term.getValue());
return SimpleSqlFragments.of(sql.getSql(), sql.getParameters());
}
return EmptySqlFragments.INSTANCE;
}

Expand Down

0 comments on commit 2ad7d62

Please sign in to comment.