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

Implement more API for Simple key-value pair data type #517

Open
bigboss2063 opened this issue Dec 1, 2023 · 21 comments
Open

Implement more API for Simple key-value pair data type #517

bigboss2063 opened this issue Dec 1, 2023 · 21 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bigboss2063
Copy link
Member

bigboss2063 commented Dec 1, 2023

At present, the API supported for Simple key-value pairs are limited, and there is a need to further expand the functionality of nutsdb.

We plan to implement the following interfaces in tx_btree.go (including but not limited to, if you want to implement more, comment).

If you want to participate, please leave a comment below. Notice: The following API descriptions are all command descriptions in Redis. Please add Bucket when implementing it, and implement it in the form of nutsdb. API like INCR and DECR can be claimed together for a more consistent code style.

Please update the docs and examples when you finish.

Command Description assigned to finished
MSET key value [key value...] Set multiple key-value pairs. @TremblingV5
MGET key [key...] Get values of multiple keys. @TremblingV5
INCR key Increment the integer value of a key. @TremblingV5
DECR key Decrement the integer value of a key. @TremblingV5
INCRBY key increment Increment the integer value of a key by a specified amount. @TremblingV5
DECRBY key decrement Decrement the integer value of a key by a specified amount. @TremblingV5
APPEND key value Append a value to an existing key if it is a string. @TremblingV5
STRLEN key Get the length of the value stored at a key. @yudhasubki
SETNX key value Set the value of a key if it does not exist. @ksankeerth
SETEX key value Set the value of a key if it does exist. @ksankeerth
GETSET key value Set the value of a key and return its old value. @yudhasubki
GETBIT key offset For the string value stored in key, obtain the bit at the specified offset. @TremblingV5
SETBIT key offset value Set or clear the bit at the specified offset for the string value stored in key. @TremblingV5
GETRANGE key start end Return the substring of the string value in key. @TremblingV5
TTL key Returns the remaining expiration time of key. @ksankeerth
PERSIST key Remove expiration time of key. @ksankeerth

If you have any other suggestions, please comment 🙌.

@bigboss2063 bigboss2063 added enhancement New feature or request good first issue Good for newcomers labels Dec 1, 2023
@elliotchenzichang elliotchenzichang added the help wanted Extra attention is needed label Dec 1, 2023
@TremblingV5
Copy link
Contributor

I want to participate this proposal, so could you assign one or some to me ?

@ksankeerth
Copy link
Contributor

I also want to contribute this proposal, Can you assign one or few tasks to me?
I'm happy to collaborate with @TremblingV5 for this proposal.

@bigboss2063
Copy link
Member Author

I want to participate this proposal, so could you assign one or some to me ?

Hi! You can choose any api that you want to implement 😁, or how about INCR, DECR, INCRBY, DECRBY ?

@bigboss2063
Copy link
Member Author

I also want to contribute this proposal, Can you assign one or few tasks to me? I'm happy to collaborate with @TremblingV5 for this proposal.

Thanks! You can choose any api that you want to implement, or how about SETNX, SETEX?

@ksankeerth
Copy link
Contributor

I also want to contribute this proposal, Can you assign one or few tasks to me? I'm happy to collaborate with @TremblingV5 for this proposal.

Thanks! You can choose any api that you want to implement, or how about SETNX, SETEX?

Sure, I'll work on APIs for SETNX and SETEX.

@TremblingV5
Copy link
Contributor

I want to participate this proposal, so could you assign one or some to me ?

Hi! You can choose any api that you want to implement 😁, or how about INCR, DECR, INCRBY, DECRBY ?

OK, got it

@TremblingV5
Copy link
Contributor

The last job seem has been finished, so could you please assign me other one or some

@bigboss2063
Copy link
Member Author

The last job seem has been finished, so could you please assign me other one or some

Sure! Maybe GETBIT and SETBIT?

@TremblingV5
Copy link
Contributor

The last job seem has been finished, so could you please assign me other one or some

Sure! Maybe GETBIT and SETBIT?

OK, got it

@ksankeerth
Copy link
Contributor

Hi @bigboss2063, Can you assign a few more tasks to me?

@bigboss2063
Copy link
Member Author

Hi @bigboss2063, Can you assign a few more tasks to me?

Sure, how about TTL and PERSIST?

@ksankeerth
Copy link
Contributor

Hi @bigboss2063, Can you assign a few more tasks to me?

Sure, how about TTL and PERSIST?

👍

@bigboss2063
Copy link
Member Author

There is a thing I forgot. If you implement a API, please update the doc and example. @ksankeerth @TremblingV5

@yudhasubki
Copy link
Contributor

hi @bigboss2063 do you mind assigning me StrLen()?

@bigboss2063
Copy link
Member Author

hi @bigboss2063 do you mind assigning me StrLen()?

Sure!

@yudhasubki
Copy link
Contributor

hi @bigboss2063 let me take the GetSet()

@bigboss2063
Copy link
Member Author

hi @bigboss2063 let me take the GetSet()

Sure!

@TremblingV5
Copy link
Contributor

I'm ready for next work, please assign me one or more. I prefer more. : )

@bigboss2063
Copy link
Member Author

I'm ready for next work, please assign me one or more. I prefer more. : )

If you don't think it's too simple, I can assign them all to you. 🤣

@TremblingV5
Copy link
Contributor

If you don't think it's too simple, I can assign them all to you. 🤣

OK I can do them all 🤣

@bigboss2063
Copy link
Member Author

Guys, our task is temporarily completed. If you have any more ideas, please comment or open a new issue. 😁

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

No branches or pull requests

5 participants