File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
hibernate-community-dialects/src/main/java/org/hibernate/community/dialect Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,25 @@ public void visitOffsetFetchClause(QueryPart queryPart) {
136136 if ( !queryPart .isRoot () && queryPart .getOffsetClauseExpression () != null ) {
137137 throw new IllegalArgumentException ( "Can't emulate offset clause in subquery" );
138138 }
139+ // We use 'select first n' on Informix, so nothing to do here
140+ }
141+
142+ @ Override
143+ protected void beforeQueryGroup (QueryGroup queryGroup , QueryPart currentQueryPart ) {
144+ if ( queryGroup .isRoot () && queryGroup .hasOffsetOrFetchClause () ) {
145+ append ( "select " );
146+ renderFirstSkipClause ( queryGroup .getOffsetClauseExpression (),
147+ queryGroup .getFetchClauseExpression () );
148+ append ( "* from " );
149+ append ( OPEN_PARENTHESIS );
150+ }
151+ }
152+
153+ @ Override
154+ protected void afterQueryGroup (QueryGroup queryGroup , QueryPart currentQueryPart ) {
155+ if ( queryGroup .isRoot () && queryGroup .hasOffsetOrFetchClause () ) {
156+ append ( CLOSE_PARENTHESIS );
157+ }
139158 }
140159
141160 @ Override
You can’t perform that action at this time.
0 commit comments