Skip to content

Predicate Class ​

Definition ​

Represents a single logical condition in a SQL WHERE clause, such as [Age] = 30 or [Name] IS NULL.

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Properties ​

NameDescription
ColumnThe name of the column this clause targets.
IsGroupGets a value indicating whether this node represents a logical
OperationThe textual representation of the operator (e.g. "=", "!=").
OperatorThe operator used to evaluate the clause condition,
ValueThe primary value being compared in the clause.
Value2An optional second value used in BETWEEN-style operators.
ValueTypeIndicates how the value(s) should be interpreted—

Methods ​

NameDescription
Predicate Between(string column, object value = null, object value2 = null, PredicateValueType valueType = null)Creates a BETWEEN clause by default with two values.
ulong ComputeHash()Compute an FNV1a hash
Predicate Create(string column, PredicateOperator op)Creates a Predicate with a strongly typed operator.
Predicate Create(string column, PredicateOperator op, object value)Creates a clause with a single value using the default parameter value type.
Predicate Create(string column, PredicateOperator op, object value, PredicateValueType valueType)Creates a clause with a single value and an explicit value type.
Predicate Create(string column, PredicateOperator op, object value, object value2, PredicateValueType valueType)Creates a dual-value clause (e.g. BETWEEN) with a typed operator.
Predicate Create(string column, string op, object value = null, PredicateValueType valueType = null)Creates a clause using a string-based operator name or symbol.
Predicate Equal(string column, object value, PredicateValueType valueType = null)Creates a clause with an Equals operator.
Predicate GreaterThan(string column, object value, PredicateValueType valueType = null)Creates a clause with an GreaterThan operator.
Predicate GreaterThanOrEqual(string column, object value, PredicateValueType valueType = null)Creates a clause with an GreaterThanOrEqual operator.
Predicate LessThan(string column, object value, PredicateValueType valueType = null)Creates a clause with an LessThan operator.
Predicate LessThanOrEqual(string column, object value, PredicateValueType valueType = null)Creates a clause with an LessThanOrEqual operator.
Predicate NotEqual(string column, object value, PredicateValueType valueType = null)Creates a clause with a NotEqual operator.
string ToDebugString()Debug-friendly representation of the clause.
string ToSql(SqlRenderContext ctx)Converts the current object into its SQL representation using the provided rendering context.