You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Ui/Service/DataSource/DAO/Dapper/DapperDataBase.cs
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -384,7 +384,11 @@ public override Result DeleteServer(IEnumerable<string> ids)
384
384
if(!result.IsSuccess)returnresult;
385
385
try
386
386
{
387
-
varret=_dbConnection?.Execute(NormalizedSql($@"DELETE FROM `{Server.TABLE_NAME}` WHERE `{nameof(Server.Id)}` IN @{nameof(Server.Id)};"),new{Id=ids})>0;
387
+
// special case: dapper does not support IN operator for postgresql
388
+
varsql=DatabaseType==DatabaseType.PostgreSQL
389
+
?$@"DELETE FROM `{Server.TABLE_NAME}` WHERE `{nameof(Server.Id)}` = ANY(@{nameof(Server.Id)});"
390
+
:$@"DELETE FROM `{Server.TABLE_NAME}` WHERE `{nameof(Server.Id)}` IN @{nameof(Server.Id)};";
0 commit comments