Common: Apply distinct to sql placeholders

This commit is contained in:
Jonathan Jenne
2022-05-18 12:59:03 +02:00
parent 48830e3dd9
commit f0c27890a8
6 changed files with 50 additions and 41 deletions

View File

@@ -209,6 +209,7 @@ Public Class frmSQLEditor
' noop
Else
Dim oPlaceholders = oPatterns.
Distinct().
Select(Function(pattern) New SQLEditor.Placeholder(pattern.Value, pattern.Value, pattern.Type, pattern.Value) With {.Pattern = pattern}).
ToList()
GridPlaceholders.DataSource = oPlaceholders
@@ -232,7 +233,6 @@ Public Class frmSQLEditor
Throw New ApplicationException($"Der Platzhalter '{oWrapped}' wurde nicht ausgefüllt!")
End If
oSql = oSql.Replace(oWrapped, oPlaceholder.Value)
Next
End If