-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Recommendation: Mark Id constructor as public #63
Comments
I think a |
That sounds good! Great library by the way, thank you so much for making it. Its written well. We ended up forking it for our needs. |
Out of curiosity: what changes did you make? Or was it "just" making the constructor public? |
I created a method in the ID generator to create a id from a DateTimeOffset, I did not end up making any changes to the ID, to keep its immutable nature. |
The problem I'm facing is: I can't use Also, passing a It's not impossible but overly complicated I think. However. a 'workaround' could be creating another Thoughts are welcome. |
I hear you, with the way everything is structured it sounds like it's going to be hard to implement in a succinct way. It worked for me because I got rid of all supporting classes and hard coded everything for my use case. |
One of the primary benefits of snowflakes is the ability to query the database for ids that were created after a certain timeframe, without relying on a separate DateTime column. This is how discord does their queries, as 64bit comparisons are faster than date time comparisons. I saw this issue that was closed #60 and I partially disagree with the answer.
We need to be able to create an ID of which represents a point of time, to generate a query to get all items past that moment.
The text was updated successfully, but these errors were encountered: