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

feature: YearMod shard algorithm #123

Open
dk-lockdown opened this issue May 31, 2022 · 4 comments
Open

feature: YearMod shard algorithm #123

dk-lockdown opened this issue May 31, 2022 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dk-lockdown
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
implement ShardingAlgorithm interface.

type ShardingAlgorithm interface {
	HasShardingKey(key string) bool
	Shard(condition *KeyCondition) (Condition, error)
	ShardRange(cond1, cond2 *KeyCondition) (Condition, error)
	AllShards() Condition
	AllowFullScan() bool
}

type YearMod struct {

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@dk-lockdown dk-lockdown added enhancement New feature or request help wanted Extra attention is needed labels May 31, 2022
@yx9o
Copy link
Contributor

yx9o commented Jun 3, 2022

Is it to implement all methods of ShardingAlgorithm?

@dk-lockdown
Copy link
Collaborator Author

Is it to implement all methods of ShardingAlgorithm?

yes

@yx9o
Copy link
Contributor

yx9o commented Jun 4, 2022

Can refer to NumberMod?

@dk-lockdown
Copy link
Collaborator Author

Can refer to NumberMod?

yes, very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants