Browse Source

Merge pull request #814 from mviegas/fix/postgres-content-filter

Fixed SQL content filter on IMonitoringApi.PostgreSql.cs
master
xiangxiren 3 years ago
committed by GitHub
parent
commit
641d4acb26
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/DotNetCore.CAP.PostgreSql/IMonitoringApi.PostgreSql.cs

+ 1
- 1
src/DotNetCore.CAP.PostgreSql/IMonitoringApi.PostgreSql.cs View File

@@ -81,7 +81,7 @@ namespace DotNetCore.CAP.PostgreSql

if (!string.IsNullOrEmpty(queryDto.Group)) where += " and Lower(\"Group\") = Lower(@Group)";

if (!string.IsNullOrEmpty(queryDto.Content)) where += " and \"Content\" ILike concat('%',@Content,'%')";
if (!string.IsNullOrEmpty(queryDto.Content)) where += " and \"Content\" ILike @Content";

var sqlQuery =
$"select * from {tableName} where 1=1 {where} order by \"Added\" desc offset @Offset limit @Limit";


Loading…
Cancel
Save