DynamicQueryEngineBaseCreateSelectDQ Method (IEntityFieldCore, IFieldPersistenceInfo, DbConnection, IPredicate, Int64, ISortExpression, IGroupByCollection, Boolean) |
Creates a new Select Query which is ready to use. If selectFilter is set to null, all rows are selected.
Namespace: SD.LLBLGen.Pro.ORMSupportClassesAssembly: SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.0.0.0 (5.0.0)
Syntax public IRetrievalQuery CreateSelectDQ(
IEntityFieldCore[] selectList,
IFieldPersistenceInfo[] fieldsPersistenceInfo,
DbConnection connectionToUse,
IPredicate selectFilter,
long maxNumberOfItemsToReturn,
ISortExpression sortClauses,
IGroupByCollection groupByClause,
bool allowDuplicates
)
Public Function CreateSelectDQ (
selectList As IEntityFieldCore(),
fieldsPersistenceInfo As IFieldPersistenceInfo(),
connectionToUse As DbConnection,
selectFilter As IPredicate,
maxNumberOfItemsToReturn As Long,
sortClauses As ISortExpression,
groupByClause As IGroupByCollection,
allowDuplicates As Boolean
) As IRetrievalQuery
Parameters
- selectList
- Type: SD.LLBLGen.Pro.ORMSupportClassesIEntityFieldCore
list of IEntityFieldCore objects to select - fieldsPersistenceInfo
- Type: SD.LLBLGen.Pro.ORMSupportClassesIFieldPersistenceInfo
Array of IFieldPersistenceInfo objects to use to build the select query - connectionToUse
- Type: System.Data.CommonDbConnection
The connection to use for the query - selectFilter
- Type: SD.LLBLGen.Pro.ORMSupportClassesIPredicate
A complete IPredicate implementing object which contains the filter for the rows to select. When set to null, no
filtering is done, and all rows are returned. - maxNumberOfItemsToReturn
- Type: SystemInt64
The maximum number of items to return with this retrieval query.
If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return.
When set to 0, no limitations are specified. - sortClauses
- Type: SD.LLBLGen.Pro.ORMSupportClassesISortExpression
The order by specifications for the sorting of the resultset. When not specified, no sorting is applied. - groupByClause
- Type: SD.LLBLGen.Pro.ORMSupportClassesIGroupByCollection
The list of fields to group by on. When not specified or an empty collection is specified, no group by clause
is added to the query. A check is performed for each field in the selectList. If a field in the selectList is not present in the groupByClause
collection, an exception is thrown. - allowDuplicates
- Type: SystemBoolean
Flag which forces the inclusion of DISTINCT if set to true. If the resultset contains fields of type ntext, text or image, no duplicate filtering
is done.
Return Value
Type:
IRetrievalQueryIRetrievalQuery instance which is ready to be used.
Exceptions Exception | Condition |
---|
ArgumentNullException | When selectList is null or fieldsPersistenceInfo is null |
ArgumentException | When selectList contains no EntityFieldCore instances or fieldsPersistenceInfo is empty. |
Remarks Generic version
See Also