Skip to content

Commit

Permalink
refactor: EnumInFragmentBuilder增加ofNot
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Dec 14, 2023
1 parent 6b1aedf commit 929c43e
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,21 @@ public static EnumInFragmentBuilder of(Dialect dialect) {

throw new UnsupportedOperationException("unsupported db type :" + dialect.getType());
}

public static EnumInFragmentBuilder ofNot(Dialect dialect) {
if (dialect instanceof MysqlDialect) {
return MysqlEnumInFragmentBuilder.notIn;
}
if (dialect instanceof PostgresqlDialect) {
return PostgresqlEnumInFragmentBuilder.notIn;
}
if (dialect instanceof SqlServerDialect) {
return SqlServerEnumInFragmentBuilder.notIn;
}
if (dialect instanceof OracleDialect) {
return OracleEnumInFragmentBuilder.notIn;
}

throw new UnsupportedOperationException("unsupported db type :" + dialect.getType());
}
}

0 comments on commit 929c43e

Please sign in to comment.