Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[错误报告]: 分页插件在SQLServer中报错Incorrect syntax near ''OFFSET''. #6548

Open
3 tasks done
zhao-hw opened this issue Oct 23, 2024 · 4 comments
Open
3 tasks done

Comments

@zhao-hw
Copy link

zhao-hw commented Oct 23, 2024

确认

  • 我使用的版本是最新版, 并且使用插件确认过项目里无依赖版本冲突
  • 我已经在 issue 中搜索过, 确认问题没有被提出过
  • 我已经修改标题, 将标题中的 描述 替换为遇到的问题

当前程序版本

3.5.8

问题描述

#6293 的调整导致当sql中没有orderby时分页插件没有自动添加ORDER BY CURRENT_TIMESTAMP

详细堆栈日志

No response

@zhao-hw
Copy link
Author

zhao-hw commented Nov 7, 2024

这个问题为什么没有回复?
是需要用户自己添加order by吗?还是说SQL Server有配置项可以取消offset必须有order by的限制,对SQL Server不是太了解。
如果确实有问题需要提pr的话还在标记了@deprecated的SQLServerDialect中改吗?

@miemieYaho
Copy link
Member

分页插件设置dbtype=SQL_SERVER2005

@ForeverNewbee
Copy link

多数据源的情况下,我只能间接的解决这个问题临时解决方案

@zhao-hw
Copy link
Author

zhao-hw commented Nov 21, 2024

多数据源的情况下,我只能间接的解决这个问题临时解决方案

我是修改了DialectFactory使getDialect能返回SQL_SERVER,然后修改了SQLServerDialect在没有order by时添加ORDER BY CURRENT_TIMESTAMP,目前还没有遇到问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants