Table of Contents

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 string

The name of the column to filter on.

ParameterName string

The parameter name for the value to compare (optional).

TableAlias string

The alias of the table (optional).

FilterOperator FilterOperators

The filter operator to use (e.g., Equal, In, IsNull).

IsRaw bool

Indicates if the where expression is a raw SQL fragment.

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

FilterOperator

The filter operator to use (e.g., Equal, In, IsNull).

public FilterOperators FilterOperator { get; init; }

Property Value

FilterOperators

ParameterName

The parameter name for the value to compare (optional).

public string ParameterName { get; init; }

Property Value

string

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 string
ParameterName string
TableAlias string
FilterOperator FilterOperators
IsRaw bool

Equals(ColumnExpression?)

public override sealed bool Equals(ColumnExpression? other)

Parameters

other ColumnExpression

Returns

bool

Equals(WhereExpression?)

public virtual bool Equals(WhereExpression? other)

Parameters

other WhereExpression

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(WhereExpression?, WhereExpression?)

public static bool operator ==(WhereExpression? left, WhereExpression? right)

Parameters

left WhereExpression
right WhereExpression

Returns

bool

operator !=(WhereExpression?, WhereExpression?)

public static bool operator !=(WhereExpression? left, WhereExpression? right)

Parameters

left WhereExpression
right WhereExpression

Returns

bool