Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
kv: Add increment functionality #45
Conversation
|
I think this should be good for an initial pass of feedback. |
|
Looking good. This code could use a bunch of comments though, especially given the nuanced MySQL behavior it relies on. |
Good idea. I've added some comments in 1a5789b - feel free to let me know if it's too much or too little. |
|
Looks good. Thanks for explaining things. |
|
/cc @zerowidth Would you be able to review this? |
This reverts commit 54dd97f.
|
I'm really happy with how this has turned out. Thanks for bearing with me and explaining everything multiple times. |
|
Turns out my
as seen in |
|
|
For some functionality we're requiring the ability to increment the values of specific keys. This PR adds the ability to increment a key within KV returning the new value. For example:
By default increment will increment the value by
1however you can pass anamount:parameter to specifiy the amount. Furthermore, incrementing can also take anexpiresparameter to update the TTL.Todo:
/cc @mastahyeti
/cc @dbussink Since you had the idea for the original
last_insert_idhack :)