Table of Contents

Class SqlPredicate.IsTrue

Namespace
LinqToDB.Internal.SqlQuery
Assembly
linq2db.dll

'[NOT] Expr1 IS TRUE' predicate.

public sealed class SqlPredicate.IsTrue : SqlPredicate.BaseNotExpr, ISqlPredicate, IQueryElement
Inheritance
SqlPredicate.IsTrue
Implements
Inherited Members
Extension Methods

Constructors

IsTrue(ISqlExpression, ISqlExpression, ISqlExpression, bool?, bool)

public IsTrue(ISqlExpression exp1, ISqlExpression trueValue, ISqlExpression falseValue, bool? withNull, bool isNot)

Parameters

exp1 ISqlExpression
trueValue ISqlExpression
falseValue ISqlExpression
withNull bool?
isNot bool

Properties

ElementType

AST node type.

public override QueryElementType ElementType { get; }

Property Value

QueryElementType

FalseValue

public ISqlExpression FalseValue { get; set; }

Property Value

ISqlExpression

TrueValue

public ISqlExpression TrueValue { get; set; }

Property Value

ISqlExpression

WithNull

  • null : evaluate predicate as is and preserve UNKNOWN (null) values if they produced
  • false : UNKNOWN values should be converted to FALSE
  • true : UNKNOWN values should be converted to TRUE
public bool? WithNull { get; }

Property Value

bool?

Methods

CanBeUnknown(NullabilityContext, bool)

Returns true if predicate could be evaluated to UNKNOWN.

public override bool CanBeUnknown(NullabilityContext nullability, bool withoutUnknownErased)

Parameters

nullability NullabilityContext
withoutUnknownErased bool

Returns

bool

Equals(ISqlPredicate, Func<ISqlExpression, ISqlExpression, bool>)

public override bool Equals(ISqlPredicate other, Func<ISqlExpression, ISqlExpression, bool> comparer)

Parameters

other ISqlPredicate
comparer Func<ISqlExpression, ISqlExpression, bool>

Returns

bool

GetElementHashCode()

public override int GetElementHashCode()

Returns

int

Invert(NullabilityContext)

public override ISqlPredicate Invert(NullabilityContext nullability)

Parameters

nullability NullabilityContext

Returns

ISqlPredicate

Reduce(NullabilityContext, bool)

public ISqlPredicate Reduce(NullabilityContext nullability, bool isInsidePredicate)

Parameters

nullability NullabilityContext
isInsidePredicate bool

Enables generation of addtional conversion of UNKNOWN to FALSE for nested predicates when non-nullable result.

Returns

ISqlPredicate

WritePredicate(QueryElementTextWriter)

protected override void WritePredicate(QueryElementTextWriter writer)

Parameters

writer QueryElementTextWriter