Table of Contents

Class SqlSearchCondition

Namespace
LinqToDB.Internal.SqlQuery
Assembly
linq2db.dll
public sealed class SqlSearchCondition : SqlExpressionBase, ISqlExpression, IEquatable<ISqlExpression>, ISqlPredicate, IQueryElement
Inheritance
SqlSearchCondition
Implements
Inherited Members
Extension Methods

Constructors

SqlSearchCondition(bool, bool?)

public SqlSearchCondition(bool isOr = false, bool? canBeUnknown = null)

Parameters

isOr bool
canBeUnknown bool?

SqlSearchCondition(bool, bool?, ISqlPredicate)

public SqlSearchCondition(bool isOr, bool? canBeUnknown, ISqlPredicate predicate)

Parameters

isOr bool
canBeUnknown bool?
predicate ISqlPredicate

SqlSearchCondition(bool, bool?, ISqlPredicate, ISqlPredicate)

public SqlSearchCondition(bool isOr, bool? canBeUnknown, ISqlPredicate predicate1, ISqlPredicate predicate2)

Parameters

isOr bool
canBeUnknown bool?
predicate1 ISqlPredicate
predicate2 ISqlPredicate

SqlSearchCondition(bool, bool?, IEnumerable<ISqlPredicate>)

public SqlSearchCondition(bool isOr, bool? canBeUnknown, IEnumerable<ISqlPredicate> predicates)

Parameters

isOr bool
canBeUnknown bool?
predicates IEnumerable<ISqlPredicate>

Properties

CanReturnUnknown

public bool? CanReturnUnknown { get; }

Property Value

bool?

ElementType

AST node type.

public override QueryElementType ElementType { get; }

Property Value

QueryElementType

IsAnd

public bool IsAnd { get; set; }

Property Value

bool

IsOr

public bool IsOr { get; set; }

Property Value

bool

Precedence

public override int Precedence { get; }

Property Value

int

Predicates

public List<ISqlPredicate> Predicates { get; }

Property Value

List<ISqlPredicate>

SystemType

public override Type SystemType { get; }

Property Value

Type

Methods

Add(ISqlPredicate)

public SqlSearchCondition Add(ISqlPredicate predicate)

Parameters

predicate ISqlPredicate

Returns

SqlSearchCondition

AddRange(IEnumerable<ISqlPredicate>)

public SqlSearchCondition AddRange(IEnumerable<ISqlPredicate> predicates)

Parameters

predicates IEnumerable<ISqlPredicate>

Returns

SqlSearchCondition

CanBeNullable(NullabilityContext)

public override bool CanBeNullable(NullabilityContext nullability)

Parameters

nullability NullabilityContext

Returns

bool

CanBeUnknown(NullabilityContext, bool)

Returns true if predicate could be evaluated to UNKNOWN.

public bool CanBeUnknown(NullabilityContext nullability, bool withoutUnknownErased)

Parameters

nullability NullabilityContext
withoutUnknownErased bool

Returns

bool

CanInvert(NullabilityContext)

public bool CanInvert(NullabilityContext nullability)

Parameters

nullability NullabilityContext

Returns

bool

Deconstruct(out List<ISqlPredicate>)

public void Deconstruct(out List<ISqlPredicate> predicates)

Parameters

predicates List<ISqlPredicate>

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

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

Parameters

other ISqlExpression
comparer Func<ISqlExpression, ISqlExpression, bool>

Returns

bool

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

public 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 ISqlPredicate Invert(NullabilityContext nullability)

Parameters

nullability NullabilityContext

Returns

ISqlPredicate

IsFalse()

public bool IsFalse()

Returns

bool

IsTrue()

public bool IsTrue()

Returns

bool

ToString(QueryElementTextWriter)

Generates debug text representation of AST node.

public override QueryElementTextWriter ToString(QueryElementTextWriter writer)

Parameters

writer QueryElementTextWriter

Returns

QueryElementTextWriter