Click or drag to resize
IDataQuery Interface
Data query interface

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 11.0.0
Syntax
C#
public interface IDataQuery : IDataQuerySettings, 
	IWhereCondition, IQueryParameters, IQueryObject, IDisposable, IQueryObjectWithValue

The IDataQuery type exposes the following members.

Properties
  NameDescription
Public propertyAllowMaterialization
If true, the query allows materialization
Public propertyClassName
Class name
Public propertyConnectionStringName
Query connection string name
Public propertyCount
Number of actual records retrieved from the database
Public propertyCustomQueryText
Custom query text
Public propertyDataSource
Data source that provides the query data. If not set, the query queries the database directly
Public propertyDataSourceName
Data source identifier that represents the location from which the data are obtained.
(Inherited from IWhereCondition.)
Public propertyDefaultOrderByColumns
Default order by columns used in case if needed, and order by is not specified
Public propertyDefaultQuerySource
Default source of the query in case source is not defined
(Inherited from IDataQuerySettings.)
Public propertyFilterColumns
List of columns used for extra filtering within the query, e.g. "CMS_C, CMS_RN"
(Inherited from IDataQuerySettings.)
Public propertyGroupByColumns
List of columns to group by, by default doesn't group, e.g. "NodeLevel, NodeOwner"
(Inherited from IDataQuerySettings.)
Public propertyHasDataSource
Returns true if the query has specific data source
Public propertyHasGroupBy
Returns true if the given query has group by set
(Inherited from IDataQuerySettings.)
Public propertyHavingCondition
Where condition for the group by on the data, e.g. "DocumentName = 'ABC'"
(Inherited from IDataQuerySettings.)
Public propertyIncludeBinaryData
If true, the query includes the object binary data
Public propertyIsCombinedQuery
If true, this query is combined from several queries. When additional parameters are applied to it, it will be wrapped into a nested query.
Public propertyIsNested
Indicates that this query is nested within another query as its source. This brings certain constraints such as that is cannot use CTE.
(Inherited from IDataQuerySettings.)
Public propertyIsPagedQuery
Returns true if the query has the paging enabled
(Inherited from IDataQuerySettings.)
Public propertyIsSubQuery
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.
(Inherited from IDataQuerySettings.)
Public propertyMaxRecords
Maximum number of results to return (use for paging together with Offset)
(Inherited from IDataQuerySettings.)
Public propertyName
Object name, empty by default
(Inherited from IQueryObject.)
Public propertyOffset
Index of the first record to return (use for paging together with MaxRecords)
(Inherited from IDataQuerySettings.)
Public propertyOrderByColumns
List of columns by which the result should be sorted, e.g. "NodeLevel, DocumentName DESC"
(Inherited from IDataQuerySettings.)
Public propertyParameters
Query data parameters
(Inherited from IQueryObject.)
Public propertyQueryName
Query name
Public propertyQuerySource
Source of the query
(Inherited from IDataQuerySettings.)
Public propertyQueryText
Query text
Public propertyResult
DataSet with the result
Public propertyReturnsSingleColumn
Returns true if the query returns single column
Public propertySelectColumnsList
List of columns to return, by default returns all columns, e.g. "DocumentName, DocumentID"
(Inherited from IDataQuerySettings.)
Public propertySelectDistinct
If set to true, returns only distinct (different) values.
(Inherited from IDataQuerySettings.)
Public propertySupportsReader
Returns true if the query supports data reader
Public propertyTables
Collection of the result tables
Public propertyTopNRecords
If set, selects only first top N number of records
(Inherited from IDataQuerySettings.)
Public propertyTotalExpression
Total items expression. When defined, used instead default total items for a paged query.
(Inherited from IDataQuerySettings.)
Public propertyTotalRecords
Gets the number of total records when paging is used. Gets updated once the query executes
Public propertyWhereCondition
Where condition on the data, e.g. "DocumentName = 'ABC'"
(Inherited from IWhereCondition.)
Public propertyWhereIsComplex
Returns true if the given where condition contains compound conditions, e. g. "A > 1 AND B = 5"
(Inherited from IWhereCondition.)
Public propertyWhereIsEmpty
Returns true if the where condition is empty
(Inherited from IWhereCondition.)
Top
Methods
  NameDescription
Public methodApplyParametersTo
Applies this where condition to the target object
(Inherited from IQueryParameters.)
Public methodApplySettings(AbstractQueryObject)
Applies the given settings to the query
Public methodApplySettings(ActionDataQuerySettings)
Applies the given settings to the query
Public methodAsT
Changes the type of the query to another type
Public methodAsIDQuery
Creates an ID query from the given query
Public methodAsMaterializedList
Makes a materialized list from the given query
Public methodAsNestedTResult
Creates a nested query from the given query
Public methodAsSingleColumn
Creates a single column query from the given query
Public methodAsSubQuery
Modifies the query to be able to be used as a sub-query, e.g. for usage in WHERE A IN ([query]). Ensures single column result, and removes order by from the result.
Public methodAsValue
Gets a query expression representing this object as a value
(Inherited from IQueryObjectWithValue.)
Public methodChanged
Marks the object as changed
(Inherited from IQueryObject.)
Public methodCloneObject
Creates the clone of the object.
(Inherited from IQueryObject.)
Public methodCopyPropertiesTo
Copies the properties to the target query.
(Inherited from IQueryParameters.)
Public methodEnsureParameters
Ensures data parameters for the given query
(Inherited from IQueryParameters.)
Public methodExecute
Executes the current query and returns it's results as a DataSet
Public methodExecuteReader
Executes the current query and returns it's results as a data reader
Public methodExpand
Expands the expression by replacing parameters with their values
(Inherited from IQueryParameters.)
Public methodForEachRow
Executes the given action for each item (DataRow) in the result. Processes the items in batches of the given size.
Public methodGetCompleteQueryParameters
Returns query parameter container filled with the complete settings of current query.
Public methodGetCompleteSettings
Gets the complete parameters for the query execution
Public methodGetExecutingQuery
Gets the query to execute against database
Public methodGetExpression
Gets a string expression representing this object
(Inherited from IQueryObjectWithValue.)
Public methodGetFullQueryText
Gets the full query text including resolved parameters
Public methodGetListResultT
Gets the result as a list of values from the first column that the query returns. Excludes null values from the result.
Public methodGetScalarResultT
Gets the scalar
Public methodGetSource
Gets a source for this query
Public methodHasCompatibleSource
Returns true if the given query is an external source
Public methodIncludeDataParameters
Adds the data parameters to the current query parameters
(Inherited from IQueryObject.)
Public methodReturnNoResults
Sets the query to return no results. This action is irreversible, once the query is set to return no results it cannot be changed. This method is used by data engine to forbid access to data that are not allowed to be accessed (e.g. license limitations), without notifying the process about the fact.
(Inherited from IWhereCondition.)
Public methodSelectT
Transforms the current result
Public methodToString
Returns the string representation of the expression, with possibility of expanding parameters
(Inherited from IQueryParameters.)
Top
See Also