Class WhereExpression
- Namespace
- FluentCommand.Query.Generators
- Assembly
- FluentCommand.dll
Represents a WHERE clause condition in a SQL statement.
public record WhereExpression : ColumnExpression, IEquatable<ColumnExpression>, IEquatable<WhereExpression>
- Inheritance
-
WhereExpression
- Implements
- Inherited Members
Constructors
WhereExpression(WhereExpression)
protected WhereExpression(WhereExpression original)
Parameters
original
WhereExpression
WhereExpression(string, string, string, FilterOperators, bool)
Represents a WHERE clause condition in a SQL statement.
public WhereExpression(string ColumnName, string ParameterName = null, string TableAlias = null, FilterOperators FilterOperator = FilterOperators.Equal, bool IsRaw = false)
Parameters
ColumnName
stringThe name of the column to filter on.
ParameterName
stringThe parameter name for the value to compare (optional).
TableAlias
stringThe alias of the table (optional).
FilterOperator
FilterOperatorsThe filter operator to use (e.g., Equal, In, IsNull).
IsRaw
boolIndicates if the where expression is a raw SQL fragment.
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
FilterOperator
The filter operator to use (e.g., Equal, In, IsNull).
public FilterOperators FilterOperator { get; init; }
Property Value
ParameterName
The parameter name for the value to compare (optional).
public string ParameterName { get; init; }
Property Value
Methods
Deconstruct(out string, out string, out string, out FilterOperators, out bool)
public void Deconstruct(out string ColumnName, out string ParameterName, out string TableAlias, out FilterOperators FilterOperator, out bool IsRaw)
Parameters
ColumnName
stringParameterName
stringTableAlias
stringFilterOperator
FilterOperatorsIsRaw
bool
Equals(ColumnExpression?)
public override sealed bool Equals(ColumnExpression? other)
Parameters
other
ColumnExpression
Returns
Equals(WhereExpression?)
public virtual bool Equals(WhereExpression? other)
Parameters
other
WhereExpression
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builder
StringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(WhereExpression?, WhereExpression?)
public static bool operator ==(WhereExpression? left, WhereExpression? right)
Parameters
left
WhereExpressionright
WhereExpression
Returns
operator !=(WhereExpression?, WhereExpression?)
public static bool operator !=(WhereExpression? left, WhereExpression? right)
Parameters
left
WhereExpressionright
WhereExpression