Class QueryStatement
- Namespace
- FluentCommand.Query
- Assembly
- FluentCommand.dll
Represents a SQL query statement, including the SQL text and its associated parameters.
public class QueryStatement : IQueryStatement
- Inheritance
-
QueryStatement
- Implements
- Inherited Members
Constructors
QueryStatement(string, IReadOnlyCollection<QueryParameter>)
Initializes a new instance of the QueryStatement class with the specified SQL statement and parameters.
public QueryStatement(string statement, IReadOnlyCollection<QueryParameter> parameters)
Parameters
statement
stringThe SQL statement text to be executed.
parameters
IReadOnlyCollection<QueryParameter>The collection of QueryParameter objects used in the query.
Exceptions
- ArgumentException
Thrown if
statement
is null or whitespace.- ArgumentNullException
Thrown if
parameters
isnull
.
Properties
Parameters
Gets the collection of QueryParameter objects used in the query.
public IReadOnlyCollection<QueryParameter> Parameters { get; }
Property Value
- IReadOnlyCollection<QueryParameter>
An IReadOnlyCollection<T> of QueryParameter representing the parameters and their values for the SQL statement.
Statement
Gets the SQL statement text to be executed.
public string Statement { get; }