Class QueryParameters
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Query parameters container.
public class QueryParameters
- Inheritance
-
objectQueryParameters
- Extension Methods
Constructors
QueryParameters(QueryInfo, QueryDataParameters, QueryMacros)
Constructor.
public QueryParameters(QueryInfo qi, QueryDataParameters parameters, QueryMacros macros)
Parameters
qi
QueryInfoQuery info
parameters
QueryDataParametersQuery parameters
macros
QueryMacrosQuery expressions
QueryParameters(string, QueryDataParameters, QueryTypeEnum, bool)
Constructor.
public QueryParameters(string queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, bool transaction = false)
Parameters
queryText
stringQuery text
queryParams
QueryDataParametersQuery parameters
queryType
QueryTypeEnumQuery type
transaction
boolRequires 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
stringQuery name in format application.class.queryname
queryText
stringQuery text
parameters
QueryDataParametersQuery parameters
queryType
QueryTypeEnumQuery type
requiresTransaction
boolRequires transaction
macros
QueryMacrosQuery expressions
connectionStringName
stringConnection 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
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
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
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
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