Table of Contents

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 string

The 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 is null.

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; }

Property Value

string

A string containing the SQL query statement.

See Also