DynamicQueryEngineManglePageSelectDQ2012 Method (IRetrievalQuery, Int32, Int32, Boolean) |
Creates a query using OFFSET and FETCH NEXT. For SQL Server 2012 and later.
Namespace:
SD.LLBLGen.Pro.DQE.SqlServer
Assembly:
SD.LLBLGen.Pro.DQE.SqlServer (in SD.LLBLGen.Pro.DQE.SqlServer.dll) Version: 5.10.0.0 (5.10.0)
Syntax protected virtual void ManglePageSelectDQ2012(
IRetrievalQuery selectQuery,
int rowsToSkip,
int rowsToTake,
bool orderByPresent
)
Protected Overridable Sub ManglePageSelectDQ2012 (
selectQuery As IRetrievalQuery,
rowsToSkip As Integer,
rowsToTake As Integer,
orderByPresent As Boolean
)
Parameters
- selectQuery
- Type: SD.LLBLGen.Pro.ORMSupportClassesIRetrievalQuery
the actual query to page over. - rowsToSkip
- Type: SystemInt32
The rows to skip. - rowsToTake
- Type: SystemInt32
The rows to take. - orderByPresent
- Type: SystemBoolean
if set to true there's an order by present in the outer query.
Remarks
Query structure:
SELECT ...
FROM ...
OFFSET rowsToSkip ROWS
-- if rowsToTake > 0 ->
FETCH NEXT (rowsToTake) ROWS ONLY
If no order by is present in the query, orderByPresent is false, and the query engine will append an ORDER BY (SELECT NULL) first before the OFFSET.
See Also