Skip to content

Commit

Permalink
[Bug-4097][admin]bug fix 4 post gre sql when using concat (#4121)
Browse files Browse the repository at this point in the history
  • Loading branch information
MactavishCui authored Jan 6, 2025
1 parent eab7cd0 commit e394019
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ public Object intercept(final Invocation invocation) throws Throwable {
BoundSql boundSql = statementHandler.getBoundSql();
Field field = boundSql.getClass().getDeclaredField("sql");
field.setAccessible(true);
field.set(boundSql, boundSql.getSql().replace("`", "\"").toLowerCase());
field.set(
boundSql,
boundSql.getSql()
.replace("`", "\"")
.replace("concat('%', ?, '%')", "concat('%', ?::text, '%')")
.toLowerCase());
return invocation.proceed();
}

Expand Down

0 comments on commit e394019

Please sign in to comment.