test_class.file: shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/test/java/org/apache/shardingsphere/sql/parser/binder/segment/select/pagination/engine/PaginationContextEngineTest.java
test_class.identifier: PaginationContextEngineTest
test_case.body: @Test
      public void assertCreatePaginationContextWhenLimitSegmentIsPresentForSQL92() {
          SQL92SelectStatement selectStatement = new SQL92SelectStatement();
          selectStatement.setLimit(new LimitSegment(0, 10, new NumberLiteralLimitValueSegment(0, 10, 100L),
                  new NumberLiteralLimitValueSegment(0, 10, 100L)));
          PaginationContext paginationContext = new PaginationContextEngine().createPaginationContext(selectStatement, null, Collections.emptyList());
          assertTrue(paginationContext.getOffsetSegment().isPresent());
          assertTrue(paginationContext.getRowCountSegment().isPresent());
      }
test_case.class_method_signature: PaginationContextEngineTest.assertCreatePaginationContextWhenLimitSegmentIsPresentForSQL92()
test_case.full_signature: @Test public void assertCreatePaginationContextWhenLimitSegmentIsPresentForSQL92()
test_case.identifier: assertCreatePaginationContextWhenLimitSegmentIsPresentForSQL92
test_case.invocations: setLimit createPaginationContext emptyList assertTrue isPresent getOffsetSegment assertTrue isPresent getRowCountSegment
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertCreatePaginationContextWhenLimitSegmentIsPresentForSQL92()
focal_class.file: shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/segment/select/pagination/engine/PaginationContextEngine.java
focal_class.identifier: PaginationContextEngine
focal_class.class_method_signature: PaginationContextEngine.createPaginationContext(final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters)
focal_class.full_signature: public PaginationContext createPaginationContext(final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters)
focal_class.identifier: createPaginationContext
focal_class.modifiers: public
focal_class.parameters: (final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters)
focal_class.return: PaginationContext
focal_class.signature: PaginationContext createPaginationContext(final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters)
focal_class.class_method_signature: PaginationContextEngine.findTopProjection(final SelectStatement selectStatement)
focal_class.full_signature: private Optional<TopProjectionSegment> findTopProjection(final SelectStatement selectStatement)
focal_class.identifier: findTopProjection
focal_class.modifiers: private
focal_class.parameters: (final SelectStatement selectStatement)
focal_class.return: Optional<TopProjectionSegment>
focal_class.signature: Optional<TopProjectionSegment> findTopProjection(final SelectStatement selectStatement)
focal_method.body: public PaginationContext createPaginationContext(final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters) {
          Optional<LimitSegment> limitSegment = SelectStatementHandler.getLimitSegment(selectStatement);
          if (limitSegment.isPresent()) {
              return new LimitPaginationContextEngine().createPaginationContext(limitSegment.get(), parameters);
          }
          Optional<TopProjectionSegment> topProjectionSegment = findTopProjection(selectStatement);
          Optional<WhereSegment> whereSegment = selectStatement.getWhere();
          if (topProjectionSegment.isPresent()) {
              return new TopPaginationContextEngine().createPaginationContext(
                      topProjectionSegment.get(), whereSegment.isPresent() ? whereSegment.get().getExpr() : null, parameters);
          }
          if (whereSegment.isPresent()) {
              return new RowNumberPaginationContextEngine().createPaginationContext(whereSegment.get().getExpr(), projectionsContext, parameters);
          }
          return new PaginationContext(null, null, parameters);
      }
focal_method.class_method_signature: PaginationContextEngine.createPaginationContext(final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters)
focal_method.full_signature: public PaginationContext createPaginationContext(final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters)
focal_method.identifier: createPaginationContext
focal_method.invocations: getLimitSegment isPresent createPaginationContext get findTopProjection getWhere isPresent createPaginationContext get isPresent getExpr get isPresent createPaginationContext getExpr get
focal_method.modifiers: public
focal_method.parameters: (final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters)
focal_method.return: PaginationContext
focal_method.signature: PaginationContext createPaginationContext(final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters)