Naive implementation of incrementing#58
Open
kirillian wants to merge 2 commits intoseamusabshere:masterfrom
Open
Naive implementation of incrementing#58kirillian wants to merge 2 commits intoseamusabshere:masterfrom
kirillian wants to merge 2 commits intoseamusabshere:masterfrom
Conversation
Owner
There was a problem hiding this comment.
@kirillian woah nice and simple - do you have a test that passes?
Author
There was a problem hiding this comment.
Not yet. I was doing this for a bit of an emergency MVP that was having some performance struggles while processing millions of records...this weekend is the first one I've gotten where I actually have some time to get back to it. I'll probably rewrite this tonight. I didn't like having to pass so much stuff around, so I thought I'd take another pass at it...I also thought about possibly doing an increment_by: value signature.
Contributor
|
Use a trigger to do this or use something like an auto-increment column? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned in the top of this, this is merely a naive implementation. I will need to improve this even for my own use, but I wanted to solicit comments and suggestions while I'm doing some testing with this in my app.