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

MySQL 顺序Guid算法更新 #258

Closed
wants to merge 1 commit into from

Conversation

yuzukwok
Copy link

不同数据库顺序guid要求不同

@caleblloyd
Copy link
Contributor

Why use this over the existing SequentialGuidValueGenerator.cs in upstream?

@yuzukwok
Copy link
Author

This article can explain that why the existing SequentialGuidValueGenerator.cs in upstream doesnot work correctly in MySQL

https://www.codeproject.com/articles/388157/guids-as-fast-primary-keys-under-multiple-database

@caleblloyd
Copy link
Contributor

Ok, makes sense if SQL Server is putting their sequential values at the end. MySql needs them at the beginning.

Let me see if I can fix this up a little, add tests, and open a separate PR.

@yuzukwok
Copy link
Author

thank you

@caleblloyd
Copy link
Contributor

We'll need to take into account GUID format in MySqlScopedTypeMapper.cs

It could be either CHAR(36) or BINARY(16). Will need to write a method to convert Binary to Hex and add dashes if it is CHAR(36)

@yukozh yukozh requested a review from caleblloyd April 14, 2017 12:01
@yukozh yukozh added this to the 2.0.0 milestone Apr 14, 2017
@caleblloyd caleblloyd mentioned this pull request Apr 15, 2017
@caleblloyd
Copy link
Contributor

Closing in favor of #260

@caleblloyd caleblloyd closed this Apr 15, 2017
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

Successfully merging this pull request may close these issues.

3 participants