DynamicQueryEngineBase.CreateSelectDQ Method (IEntityFieldCore[],IFieldPersistenceInfo[], DbConnection, IPredicate, Int32, Int32, ISortExpression, IRelationCollection, Boolean, IGroupByCollection) |
Creates a new Select Query which is ready to use, based on the specified select list and the specified set of relations.
If selectFilter is set to null, all rows are selected.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.3.0.0 (5.3.0)
Syntaxpublic IRetrievalQuery CreateSelectDQ(
IEntityFieldCore[] selectList,
IFieldPersistenceInfo[] fieldsPersistenceInfo,
DbConnection connectionToUse,
IPredicate selectFilter,
int rowsToSkip,
int rowsToTake,
ISortExpression sortClauses,
IRelationCollection relationsToWalk,
bool allowDuplicates,
IGroupByCollection groupByClause
)
Public Function CreateSelectDQ (
selectList As IEntityFieldCore(),
fieldsPersistenceInfo As IFieldPersistenceInfo(),
connectionToUse As DbConnection,
selectFilter As IPredicate,
rowsToSkip As Integer,
rowsToTake As Integer,
sortClauses As ISortExpression,
relationsToWalk As IRelationCollection,
allowDuplicates As Boolean,
groupByClause As IGroupByCollection
) As IRetrievalQuery
Parameters
- selectList
- Type:SD.LLBLGen.Pro.ORMSupportClasses.IEntityFieldCore[]
list of IEntityFieldCore objects to select - fieldsPersistenceInfo
- Type:SD.LLBLGen.Pro.ORMSupportClasses.IFieldPersistenceInfo[]
Array of IFieldPersistenceInfo objects to use to build the select query - connectionToUse
- Type: System.Data.Common.DbConnection
The connection to use for the query - selectFilter
- Type: SD.LLBLGen.Pro.ORMSupportClasses.IPredicate
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. - rowsToSkip
- Type: System.Int32
The rows to skip. Default 0 - rowsToTake
- Type: System.Int32
The rows to take. Default 0, which means all. - sortClauses
- Type: SD.LLBLGen.Pro.ORMSupportClasses.ISortExpression
The order by specifications for the sorting of the resultset. When not specified, no sorting is applied. - relationsToWalk
- Type: SD.LLBLGen.Pro.ORMSupportClasses.IRelationCollection
list of EntityRelation objects, which will be used to formulate a FROM clause with INNER JOINs. - allowDuplicates
- Type: System.Boolean
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. - groupByClause
- Type: SD.LLBLGen.Pro.ORMSupportClasses.IGroupByCollection
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.
Return Value
Type:
IRetrievalQuery
IRetrievalQuery instance which is ready to be used.
ExceptionsException | Condition |
---|
ArgumentNullException | When selectList is null or fieldsPersistenceInfo is null or relationsToWalk is null |
ArgumentException | When selectList contains no EntityFieldCore instances or fieldsPersistenceInfo is empty. |
Remarks
Generic version
See Also