Efcore: Support cache when creating a sequence

Created on 14 Mar 2018  路  8Comments  路  Source: dotnet/efcore

Hi,
May I know are there any plan for ef core to support cache size for sequence, something like this:
modelBuilder.HasSequence("OrderNumbers", schema: "shared")
.StartsAt(1000)
.IncrementsBy(5)
_.CacheSize(10)_;

Thanks,
Bruce'

good first issue type-enhancement

Most helpful comment

If nobody is working on this, I would like to give it a try

All 8 comments

If nobody is working on this, I would like to give it a try

Sounds good @ilmax. Just keep in mind that at this stage we may choose not to take the PR in 2.1.

Ok, no problem! I'm working on it now

I made some progress on this, some unit tests are still missing but the implementation should mostly be done. I have a some questions though and would like to get some feedback because adding cache size support ended up in a breaking change, I've also left a couple of TODOs around.
What's the best way to proceed with this? Should I open a WIP PR or wait till 2.1 is out of the door?

@ilmax - Feel free to open PR. We can always merge it after 2.1 or merge into feature branch if 2.1 is not fully done.

@ilmax if things are working out, could you try fitting in "NO CACHE" as well?

@ajcvickers As you removed the help wanted tag - can you tell something about the current state of this issue? Thanks!

@Compufreak345 There were some inconsistencies in how help wanted was being used. This issue is marked as good first issue, indicating the implementation should not be too difficult for a community member to attempt.

Beyond that, this issue is in the Backlog milestone, which means we still plan to implement it in some future release, but not for the next release.

Was this page helpful?
0 / 5 - 0 ratings