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

New data structure —— String #135

Closed
qishenonly opened this issue Jul 3, 2023 · 2 comments
Closed

New data structure —— String #135

qishenonly opened this issue Jul 3, 2023 · 2 comments
Assignees
Labels
difficult:⭐⭐⭐⭐⭐ Up to five stars enhancement New feature or request

Comments

@qishenonly
Copy link
Member

qishenonly commented Jul 3, 2023

We need a new data structure, String, to extend the database's key-value storage structure.
We need to build some instructions into String to make it more complete.
If you are interested in extending the String data structure, you can comment below on the issue id you would like to try and we will assign it to you.

id issue method describtion people process
1 String method Set Set key value ttl Set the value of the specified key to a string. The parameters include the key, value, and expiration time @qishenonly finish
2 String method Get Get key Gets the value of the specified key. @qishenonly finish
3 String method Del Del key Deletes the specified key. @qishenonly finish
4 String method Type Type key Gets the type of the key @qishenonly finish
5 String method StrLen StrLen key Gets the length of the value for the specified key. @qishenonly finish
6 String method GetSet GetSet key value ttl Sets the new value of the specified key and returns the old value. Parameters include key, value, and expiration time @qishenonly finish
7 String method MSet MSet key1 value1 [key2 value2 ...] Set multiple key pairs at the same time. @wangchenguang123   
8 String method MSetNX MSetNX key1 value1 [key2 value2 ...] If none of the specified keys exists, set multiple key pairs. @wangchenguang123   
9 String method MGet MGet key [key ...] Gets the value of multiple keys simultaneously. @wangchenguang123   
10 String method Append Append key value Appends the specified string to the end of the value of the specified key. @qishenonly finish
11 String method SetEX SetEX key seconds value Sets the value of the specified key and specifies the expiration time in seconds. @qishenonly finish
12 String method PSetEX PSetEX key milliseconds value Sets the value of the specified key and specifies the expiration time in milliseconds. @qishenonly finish
13 String method Incr Incr key ttl Increase the value of a specified key by 1. If the key does not exist, it is created with an initial value of 1. @qishenonly finish
14 String method IncrBy IncrBy key amount ttl Increase the value of a specified key by a given amount. If the key does not exist, it is created with an initial value of the amount. @qishenonly finish
15 String method IncrByFloat IncrByFloat key amount ttl Increase the float value of a specified key by a given amount. If the key does not exist, it is created with an initial value of the amount. @qishenonly finish
16 String method Decr Decr key ttl Decrease the value of a specified key by 1. If the key does not exist, it is created with an initial value of -1. @qishenonly finish
17 String method Exists Exists key Check if a key exists. Returns true if the key exists, false otherwise. @qishenonly finish
18 String method Expire Expire key ttl Set a timeout on a key. After the specified time-to-live (TTL) in seconds, the key will be automatically deleted. Returns true if the timeout was set, false otherwise. @qishenonly finish
19 String method Persist Persist key Remove the timeout on a key, making it persist indefinitely. Returns true if the timeout was removed, false otherwise. @qishenonly finish
20 method encodeStringValue encodeStringValue value ttl encodes the value format: type | expire | value @qishenonly finish
21 method decodeStringValue decodeStringValue value encodes the value format: type | expire | value @qishenonly finish
@wangchenguang123
Copy link
Contributor

i want to try 7,9 and try hard to finsh 8

@qishenonly
Copy link
Member Author

i want to try 7,9 and try hard to finsh 8

ok, have a try.

saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
saeid-a pushed a commit to saeid-a/FlyDB that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
CrazyJius pushed a commit that referenced this issue Jul 12, 2023
qishenonly added a commit that referenced this issue Jul 14, 2023
add implement functions structure/string.go(#135)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficult:⭐⭐⭐⭐⭐ Up to five stars enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants