Table of Contents

Class SqlErrorExpression

Namespace
LinqToDB.Internal.Expressions
Assembly
linq2db.dll
public sealed class SqlErrorExpression : Expression
Inheritance
object
SqlErrorExpression
Inherited Members
Extension Methods

Constructors

SqlErrorExpression(Expression)

public SqlErrorExpression(Expression expression)

Parameters

expression Expression

SqlErrorExpression(Expression?, string?, Type)

public SqlErrorExpression(Expression? expression, string? message, Type resultType)

Parameters

expression Expression
message string
resultType Type

SqlErrorExpression(Expression?, string?, Type, bool)

public SqlErrorExpression(Expression? expression, string? message, Type resultType, bool isCritical)

Parameters

expression Expression
message string
resultType Type
isCritical bool

SqlErrorExpression(string, Type)

public SqlErrorExpression(string message, Type resultType)

Parameters

message string
resultType Type

Properties

CanReduce

Indicates that the node can be reduced to a simpler node. If this returns true, Reduce() can be called to produce the reduced form.

public override bool CanReduce { get; }

Property Value

bool

True if the node can be reduced, otherwise false.

Expression

public Expression? Expression { get; }

Property Value

Expression

IsCritical

public bool IsCritical { get; }

Property Value

bool

Message

public string? Message { get; }

Property Value

string

NodeType

Gets the node type of this Expression.

public override ExpressionType NodeType { get; }

Property Value

ExpressionType

One of the ExpressionType values.

ResultType

public Type ResultType { get; }

Property Value

Type

Type

Gets the static type of the expression that this Expression represents.

public override Type Type { get; }

Property Value

Type

The Type that represents the static type of the expression.

Methods

Accept(ExpressionVisitor)

Dispatches to the specific visit method for this node type. For example, MethodCallExpression calls the VisitMethodCall(MethodCallExpression).

protected override Expression Accept(ExpressionVisitor visitor)

Parameters

visitor ExpressionVisitor

The visitor to visit this node with.

Returns

Expression

The result of visiting this node.

CreateException()

public Exception CreateException()

Returns

Exception

CreateException(Expression?, string?)

public static Exception CreateException(Expression? expression, string? message)

Parameters

expression Expression
message string

Returns

Exception

CreateException(string)

public static Exception CreateException(string message)

Parameters

message string

Returns

Exception

EnsureError(Expression)

public static SqlErrorExpression EnsureError(Expression expression)

Parameters

expression Expression

Returns

SqlErrorExpression

EnsureError(Expression, Type)

public static SqlErrorExpression EnsureError(Expression expression, Type resultType)

Parameters

expression Expression
resultType Type

Returns

SqlErrorExpression

PrepareExpressionString(Expression?)

public static string PrepareExpressionString(Expression? expression)

Parameters

expression Expression

Returns

string

Reduce()

Reduces this node to a simpler expression. If CanReduce returns true, this should return a valid expression. This method can return another node which itself must be reduced.

public override Expression Reduce()

Returns

Expression

The reduced expression.

ThrowError(Expression, string?)

public static void ThrowError(Expression expression, string? message)

Parameters

expression Expression
message string

ToString()

Returns a textual representation of the Expression.

public override string ToString()

Returns

string

A textual representation of the Expression.

WithType(Type)

public SqlErrorExpression WithType(Type type)

Parameters

type Type

Returns

SqlErrorExpression