Table of Contents

Class QueryParameters

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Query parameters container.

public class QueryParameters
Inheritance
object
QueryParameters
Extension Methods

Constructors

QueryParameters(QueryInfo, QueryDataParameters, QueryMacros)

Constructor.

public QueryParameters(QueryInfo qi, QueryDataParameters parameters, QueryMacros macros)

Parameters

qi QueryInfo

Query info

parameters QueryDataParameters

Query parameters

macros QueryMacros

Query expressions

QueryParameters(string, QueryDataParameters, QueryTypeEnum, bool)

Constructor.

public QueryParameters(string queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, bool transaction = false)

Parameters

queryText string

Query text

queryParams QueryDataParameters

Query parameters

queryType QueryTypeEnum

Query type

transaction bool

Requires transaction

QueryParameters(string, string, QueryDataParameters, QueryTypeEnum, bool, QueryMacros, string)

Constructor.

public QueryParameters(string queryName, string queryText, QueryDataParameters parameters, QueryTypeEnum queryType, bool requiresTransaction, QueryMacros macros, string connectionStringName)

Parameters

queryName string

Query name in format application.class.queryname

queryText string

Query text

parameters QueryDataParameters

Query parameters

queryType QueryTypeEnum

Query type

requiresTransaction bool

Requires transaction

macros QueryMacros

Query expressions

connectionStringName string

Connection string name

Properties

ConnectionStringName

Connection string name to use

public string ConnectionStringName { get; set; }

Property Value

string

ExecutionType

Execution type.

public QueryExecutionTypeEnum ExecutionType { get; set; }

Property Value

QueryExecutionTypeEnum

IsNested

Indicates that this query is nested within another query as its source. This brings certain constraints such as that is cannot use CTE.

public bool IsNested { get; set; }

Property Value

bool

IsSubQuery

If true, the query is a sub-query used in another query. This brings certain constraints such as that it cannot use order by or CTE.

public bool IsSubQuery { get; set; }

Property Value

bool

Macros

Query expressions

public QueryMacros Macros { get; set; }

Property Value

QueryMacros

MaxRecords

Maximum number of records to get. If maxRecords is zero or less, all records are returned (no paging is used)

public int MaxRecords { get; set; }

Property Value

int

Name

Query name

public string Name { get; set; }

Property Value

string

Offset

Index of first record to get

public int Offset { get; set; }

Property Value

int

Params

Query parameters.

public QueryDataParameters Params { get; set; }

Property Value

QueryDataParameters

RequiresTransaction

Requires transaction.

public bool RequiresTransaction { get; set; }

Property Value

bool

Text

Query text.

public string Text { get; set; }

Property Value

string

Type

Query type.

public QueryTypeEnum Type { get; set; }

Property Value

QueryTypeEnum

UseNewConnection

If true, a new connection instance is created for this query execution

public bool UseNewConnection { get; set; }

Property Value

bool

Methods

ResolveMacros()

Resolves the query macros in Text property value.

public void ResolveMacros()

ToString()

Returns the string representation of the query parameters

public override string ToString()

Returns

string