Summer.Batch.Data.ParsedQuery Class Reference

A class for parsing parameters of an SQL query. Parameters are expected to be named and have '@' or ':' as a prefix. The specified IPlaceholderGetter is used to replace the parameters in the substituted query. More...

Classes

struct  Position
 A simple struct to hold parameter position. More...
 

Public Member Functions

 ParsedQuery (string originalQuery, IPlaceholderGetter placeholderGetter)
 Default constructor. More...
 

Properties

string OriginalQuery [get]
 The original query, without any substitution. More...
 
bool Named [get]
 Whether the returned substituted query will have named parameters or not. More...
 
IList< string > ParameterNames [get]
 A list containing the parameter names in the order they are used. If a parameter is used several times, it will also appear several times in this list. It is useful to set parameter values when using unnamed placeholders (e.g., '?'). More...
 
string SubstitutedQuery [get]
 The query with its parameter substituted using the IPlaceholderGetter. More...
 

Detailed Description

A class for parsing parameters of an SQL query. Parameters are expected to be named and have '@' or ':' as a prefix. The specified IPlaceholderGetter is used to replace the parameters in the substituted query.

Constructor & Destructor Documentation

Summer.Batch.Data.ParsedQuery.ParsedQuery ( string  originalQuery,
IPlaceholderGetter  placeholderGetter 
)

Default constructor.

Parameters
originalQueryan SQL query
placeholderGetterthe IPlaceholderGetter to use for parameter substitution

Property Documentation

bool Summer.Batch.Data.ParsedQuery.Named
get

Whether the returned substituted query will have named parameters or not.

string Summer.Batch.Data.ParsedQuery.OriginalQuery
get

The original query, without any substitution.

IList<string> Summer.Batch.Data.ParsedQuery.ParameterNames
get

A list containing the parameter names in the order they are used. If a parameter is used several times, it will also appear several times in this list. It is useful to set parameter values when using unnamed placeholders (e.g., '?').

string Summer.Batch.Data.ParsedQuery.SubstitutedQuery
get

The query with its parameter substituted using the IPlaceholderGetter.


The documentation for this class was generated from the following file:
  • Summer.Batch.Data/ParsedQuery.cs