Table of Contents

Class SqlParameter

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

Constructors

SqlParameter(DbDataType, string?, object?)

public SqlParameter(DbDataType type, string? name, object? value)

Parameters

type DbDataType
name string
value object

Properties

AccessorId

public int? AccessorId { get; }

Property Value

int?

ElementType

AST node type.

public override QueryElementType ElementType { get; }

Property Value

QueryElementType

IsQueryParameter

public bool IsQueryParameter { get; set; }

Property Value

bool

Name

public string? Name { get; set; }

Property Value

string

NeedsCast

Enable parameter wrapping with type-cast. Ignored when IsQueryParameter is false.

public bool NeedsCast { get; set; }

Property Value

bool

Precedence

public override int Precedence { get; }

Property Value

int

SystemType

public override Type SystemType { get; }

Property Value

Type

Type

public DbDataType Type { get; set; }

Property Value

DbDataType

Value

public object? Value { get; }

Property Value

object

ValueConverter

public Func<object?, object?>? ValueConverter { get; set; }

Property Value

Func<object, object>

Methods

CanBeNullable(NullabilityContext)

public override bool CanBeNullable(NullabilityContext nullability)

Parameters

nullability NullabilityContext

Returns

bool

CorrectParameterValue(object?)

public object? CorrectParameterValue(object? rawValue)

Parameters

rawValue object

Returns

object

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

GetElementHashCode()

public override int GetElementHashCode()

Returns

int

ToString(QueryElementTextWriter)

Generates debug text representation of AST node.

public override QueryElementTextWriter ToString(QueryElementTextWriter writer)

Parameters

writer QueryElementTextWriter

Returns

QueryElementTextWriter