Package org.sqlproc.engine.plugin
Interface SqlFromToPlugin
- All Superinterfaces:
Modifiers
- All Known Implementing Classes:
DefaultSqlPlugins
The SQL Processor plugin devoted to the FROM-TO SQL construction.
The primary usage is to support the pagination.
There are utilized the patterns from the
SqlFeature. These pattern have to be combined with the original SQL
query, the limit and the offset in the next way:
- $S is the full original query
- $s is the original query without the token
select - $F is 1-based from rowid (=offset)
- $f is 0-based from rowid (offset)
- $M is the max number of returned rows
- $m is the max rowid of returned rows
- Author:
- Vladimir Hudec
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe characteristic of FROM and TO restrictions used inSqlQuery.list(SqlRuntimeContext). -
Field Summary
Fields inherited from interface org.sqlproc.engine.plugin.Modifiers
MODIFIER_ANY, MODIFIER_ANYSET, MODIFIER_CALL, MODIFIER_DISCRIMINATOR, MODIFIER_EMPTY, MODIFIER_GTYPE, MODIFIER_ID, MODIFIER_IDENTITY_GENERATOR, MODIFIER_IDENTITY_SELECT, MODIFIER_NOTEMPTY, MODIFIER_NOTNULL, MODIFIER_NULL, MODIFIER_SEQUENCE, MODIFIER_TYPE -
Method Summary
Modifier and TypeMethodDescriptionlimitQuery(SqlRuntimeContext runtimeCtx, String queryString, StringBuilder queryResult, Integer firstResult, Integer maxResults, boolean ordered) Used to construct the FROM-TO SQL.
-
Method Details
-
limitQuery
SqlFromToPlugin.LimitType limitQuery(SqlRuntimeContext runtimeCtx, String queryString, StringBuilder queryResult, Integer firstResult, Integer maxResults, boolean ordered) Used to construct the FROM-TO SQL.- Parameters:
runtimeCtx- the public runtime contextqueryString- the original ANSI SQLqueryResult- the final ANSI SQL reflected FROM and TO restrictionsfirstResult- The first SQL execution output row to be returned in the case we need to skip some rows in the result set. The primary usage is to support the pagination.maxResults- The max number of SQL execution output rows, which can be returned in the result list. The primary usage is to support the pagination.ordered- the SQL output is sorted- Returns:
- the characteristic of FROM and TO restrictions used in
SqlQuery.list(SqlRuntimeContext)
-