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

手动指定方言类型 #831

Open
1 task
aLunVladimir opened this issue Aug 9, 2024 · 3 comments
Open
1 task

手动指定方言类型 #831

aLunVladimir opened this issue Aug 9, 2024 · 3 comments

Comments

@aLunVladimir
Copy link

  • 我已在 issues 搜索类似问题,并且不存在相同的问题.

功能建议

建议添加手动指定数据库方言的方法;如PageHelper.setDialect(Dialect.MYSQL)
多数据源场景下,如果有不同版本的sqlserver数据库 该如何配置方言类型

@abel533
Copy link
Collaborator

abel533 commented Aug 9, 2024

支持运行时动态指定使用的 dialect 实现,例如 PageHelper.startPage(1, 10).using("oracle");

或者 PageHelper.startPage(2, 10).using("org.exmaple.CustomDialect");

@fengyi9958
Copy link

fengyi9958 commented Sep 19, 2024

一开始项目没有设置方言,先调用myql查询后,再调用pgsql,其中在调用pgsql之前使用了PageHelper.offsetPage(10, 10).using("postgresql"); 但是最后解析出来的SQL仍然是mysql的,解析出来是 limit 10, 10 而不是 想要的limit 10 offset 10
就会导致报错,

@cqu2014
Copy link

cqu2014 commented Sep 19, 2024 via email

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

4 participants