diff --git a/src/Connected.Expressions/Formatters/SqlFormatter.cs b/src/Connected.Expressions/Formatters/SqlFormatter.cs index 11abea5..cca0129 100644 --- a/src/Connected.Expressions/Formatters/SqlFormatter.cs +++ b/src/Connected.Expressions/Formatters/SqlFormatter.cs @@ -6,6 +6,7 @@ using System.Text; using Connected.Expressions.Languages; using Connected.Expressions.Translation; using Connected.Expressions.Visitors; +using Connected.Interop; namespace Connected.Expressions.Formatters; @@ -250,6 +251,15 @@ public class SqlFormatter : DatabaseVisitor return m; } } + else if (string.Equals(m.Method.Name, "Compare", StringComparison.Ordinal) && m.Method.DeclaringType == typeof(TypeComparer)) + { + Write(OpenBracket); + Visit(m.Arguments[0]); + Write(" = "); + Visit(m.Arguments[1]); + Write(CloseBracket); + return m; + } throw new NotSupportedException($"The method '{m.Method.Name}' is not supported"); }