Table of Contents

Class LitBlock

Namespace
Breeze.Core
Assembly
Breeze.Core.dll

A literal value in a query, coerced on construction to the data type it is being compared against.

public class LitBlock : BaseBlock
Inheritance
LitBlock
Inherited Members

Constructors

LitBlock(object?, DataType?)

Create a literal and coerce it to the given data type.

public LitBlock(object? value, DataType? dataType)

Parameters

value object

The value as it arrived from the client, usually a string or a boxed number.

dataType DataType

The type to coerce to, normally taken from the other side of the comparison; null leaves the value as it is.

Properties

DataType

The data type the literal was coerced to, or null if none was known.

public override DataType? DataType { get; }

Property Value

DataType

Methods

GetValue()

The value after coercion - what the generated expression will compare against.

public object? GetValue()

Returns

object

ToExpression(Expression)

Build the constant expression for this literal.

public override Expression ToExpression(Expression inExpr)

Parameters

inExpr Expression

The expression the block is applied to. Unused here - a literal does not depend on the row.

Returns

Expression

A ConstantExpression holding the coerced value.