Comments (5)
测试发现count为true,false不影响分页sql,没有问题。
PageHelper.offsetPage(3, 4, true);
参数对应的 hsql分页测试的SQL:
23:07:16.377 [main] DEBUG c.g.p.mapper.UserMapper.selectAll - ==> Preparing: select * from user order by id -- comment LIMIT ? OFFSET ?
23:07:16.381 [main] DEBUG c.g.p.mapper.UserMapper.selectAll - ==> Parameters: 4(Integer), 3(Long)
23:07:16.383 [main] TRACE c.g.p.mapper.UserMapper.selectAll - <== Columns: ID, NAME, PY
23:07:16.384 [main] TRACE c.g.p.mapper.UserMapper.selectAll - <== Row: 4, 常元琴, CYQ
23:07:16.390 [main] DEBUG c.g.p.mapper.UserMapper.selectAll - <== Total: 1
PageHelper.offsetPage(2, 4, true);
参数对应的 hsql分页测试的SQL:
23:07:21.507 [main] DEBUG c.g.p.mapper.UserMapper.selectAll - ==> Preparing: select * from user order by id -- comment LIMIT ? OFFSET ?
23:07:21.508 [main] DEBUG c.g.p.mapper.UserMapper.selectAll - ==> Parameters: 4(Integer), 2(Long)
23:07:21.510 [main] TRACE c.g.p.mapper.UserMapper.selectAll - <== Columns: ID, NAME, PY
23:07:21.510 [main] TRACE c.g.p.mapper.UserMapper.selectAll - <== Row: 3, 曾三杰, ZSJ
23:07:21.511 [main] TRACE c.g.p.mapper.UserMapper.selectAll - <== Row: 4, 常元琴, CYQ
23:07:21.512 [main] DEBUG c.g.p.mapper.UserMapper.selectAll - <== Total: 2
from mybatis-pagehelper.
这两个例子都是count为true的呀?
from mybatis-pagehelper.
false也测试了,和true的结果一样。。我找时间再试试mysql。
from mybatis-pagehelper.
PageHelper 版本: 5.3.1
oracle19c
遇到问题一样情况
from mybatis-pagehelper.
PageHelper 版本: 5.3.1 oracle19c 遇到问题一样情况
PageHelper.offsetPage(16,10)
分析后发现:reasonable = true 导致
1)获取count后,会setTotal, reasonable = true 时会重置startRow,endRow,导致结果不一致
from mybatis-pagehelper.
Related Issues (20)
- 如何兼容MybatisPlus 3.5.5 和 PageHelper 2.1.0 ? HOT 7
- make PageInfo implement Collection, and then can use it as a List directly HOT 1
- 开启异步count支持后,不兼容Mybatis-Plus的多租户插件 HOT 4
- springboot3.2.2引入pageHelper5.3.2执行分页方法报类型转换异常。分页不生效 HOT 1
- 开发者福利,尽快尝试领取!StarkNet针对TOP 5K进行空投!
- pagehelper在docker中卡在了启动欢迎处 HOT 1
- sqlserver 使用 PageHelper.startPage 分页报错 HOT 3
- 数据查询返回后进行转化,hasNextPage属性值永远是false HOT 3
- 升级到6.1.0后jsqlparser4.7又出问题了 HOT 2
- 版本由4.1.6 升级到5.3.2后,PageDynamicSqlSource被删除了有什么方案代替 HOT 1
- PageHelper6.1.0搭配jsqlparser4.5又出问题了
- springboot 3 整合 pagehelper 报错 Caused by: java.lang.NoClassDefFoundError: net/sf/jsqlparser/statement/select/SelectBody HOT 2
- sqlparser-timeout超时时间好像不是10秒 HOT 2
- SqlServer 跨服务器查询语句,会提示不支持该SQL转换为分页查询 HOT 2
- 希望增加分页条数的缓存功能 HOT 3
- 严重BUG,使用sqlserver时,分页查询因为ORDER BY前的空行导致查询缓慢的问题 HOT 8
- 设置超出数据页码范围pageNo,isLastPage的计算错误
- banner 建议加在PageHelperProperties 进行开关,不建议用代码方式 HOT 2
- 建议把SqlServer默认方言改为sqlserver2012 HOT 2
- 达梦数据库hint兼容group by但是PageHelper分页不支持hint HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybatis-pagehelper.