Struct SqlParameter
- Namespace
- LfrlAnvil.Sql.Statements
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents a type-erased bindable SQL parameter.
public readonly record struct SqlParameter : IEquatable<SqlParameter>
- Implements
- Inherited Members
Constructors
SqlParameter(string?, object?)
Represents a type-erased bindable SQL parameter.
public SqlParameter(string? Name, object? Value)
Parameters
Properties
IsPositional
Specifies whether or not this parameter is positional (does not have a Name).
public bool IsPositional { get; }
Property Value
Name
Optional parameter name.
public string? Name { get; init; }
Property Value
Value
Parameter value.
public object? Value { get; init; }
Property Value
Methods
Named(string, object?)
Creates a new named SqlParameter instance.
[Pure]
public static SqlParameter Named(string name, object? value)
Parameters
Returns
- SqlParameter
New named SqlParameter instance.
Positional(object?)
Creates a new positional SqlParameter instance.
[Pure]
public static SqlParameter Positional(object? value)
Parameters
value
objectParameter value.
Returns
- SqlParameter
New positional SqlParameter instance.