Add a LIMIT clause to the given SQL SELECT. Expects any database-specific offset and limit adjustments to have already been performed (ex. UseMaxForLimit, OffsetStartsAtOne).

Namespace: NHibernate.Dialect
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public virtual SqlString GetLimitString(
	SqlString queryString,
	SqlString offset,
	SqlString limit
)
Visual Basic
Public Overridable Function GetLimitString ( _
	queryString As SqlString, _
	offset As SqlString, _
	limit As SqlString _
) As SqlString
Visual C++
public:
virtual SqlString^ GetLimitString(
	SqlString^ queryString, 
	SqlString^ offset, 
	SqlString^ limit
)

Parameters

queryString
Type: NHibernate.SqlCommand..::..SqlString
The SqlString to base the limit query off.
offset
Type: NHibernate.SqlCommand..::..SqlString
Offset of the first row to be returned by the query. This may be represented as a parameter, a string literal, or a null value if no limit is requested. This should have already been adjusted to account for OffsetStartsAtOne.
limit
Type: NHibernate.SqlCommand..::..SqlString
Maximum number of rows to be returned by the query. This may be represented as a parameter, a string literal, or a null value if no offset is requested. This should have already been adjusted to account for UseMaxForLimit.

Return Value

A new SqlString that contains the LIMIT clause.

See Also