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

生成符合各个数据库的有序Guid #142

Closed
gmf520 opened this issue Mar 26, 2020 · 0 comments · Fixed by #144
Closed

生成符合各个数据库的有序Guid #142

gmf520 opened this issue Mar 26, 2020 · 0 comments · Fixed by #144
Labels
Feature 🔨 新功能,新特性 Finished ✔️ 实现并完工
Milestone

Comments

@gmf520
Copy link
Member

gmf520 commented Mar 26, 2020

您的功能请求与现有问题有关吗?请描述

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

当前的Guid生成只符合SqlServer的排序规则,需要实现符合MySql,Sqlite,PostgreSql,Oracle等数据库排序规则的有序Guid

参考:https://www.cnblogs.com/CameronWu/p/guids-as-fast-primary-keys-under-multiple-database.html

描述您想要的解决方案

A clear and concise description of what you want to happen.

变更如下:

  • 取消原OSharp.Data.CombGuid的使用,使用新的OSharp.Data.SequentialGuid
  • Guid的生成由原来的EntityBase中变更到Repository执行Insert操作时
  • 判断实体所属的DbContext的数据库类型DatabaseType,根据不同的数据库类型生成不同排序规则的Guid
@gmf520 gmf520 added Feature 🔨 新功能,新特性 Finished ✔️ 实现并完工 labels Mar 26, 2020
@gmf520 gmf520 added this to the v3.1.2 milestone Mar 26, 2020
@gmf520 gmf520 closed this as completed Mar 26, 2020
@gmf520 gmf520 linked a pull request Mar 26, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature 🔨 新功能,新特性 Finished ✔️ 实现并完工
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant