Class ExpressionToSqlCompiler

Assembly: redb.MSSql.Pro.dll

Compiles C# Expression to SQL WHERE clause for PVT (T-SQL syntax).
Supports arithmetic (+, -, *, /, %), comparisons, logic (and, or, not),
math functions (Abs, Round, Floor, Ceiling), string methods (Contains, StartsWith, EndsWith).
DateTime is converted to DateTimeOffset UTC via DateTimeConverter.

public class ExpressionToSqlCompiler

Inheritance

ObjectExpressionToSqlCompiler

Methods

Compile<TProps>(Expression<Func<TProps, bool>>)

Compiles Expression to SQL condition with parameters.

public (string SqlCondition, List<object> Parameters) Compile<TProps>(Expression<Func<TProps, bool>> expression)

ExtractFieldNames<TProps>(Expression<Func<TProps, bool>>)

Extracts field names used in Expression.

public HashSet<string> ExtractFieldNames<TProps>(Expression<Func<TProps, bool>> expression)

Constructors