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 —— Hash #136

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

New data structure —— Hash #136

qishenonly opened this issue Jul 3, 2023 · 5 comments
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, Hash, to extend the database's key-value storage structure.
We need to build some instructions into Hash to make it more complete.
If you are interested in extending the Hashdata 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 Hash method HSet HSet key field value Sets the value of the specified field in the specified hash key to the specified value. @qishenonly  finished
2 Hash method HGet HGet key field Gets the value of the specified field in the specified hash key. @qishenonly   finished
3 Hash method HMSet HMSet key field1 value1 [field2 value2 ...] Sets values for multiple fields in the specified hash key at the same time.    
4 Hash method HMGet HMGet key field1 [field2 ...] Gets the values of multiple fields in the specified hash key at the same time. @saeid-a   finished
5 Hash method HDel HDel key field1 [field2 ...] Removes one or more fields from the specified hash key. @qishenonly   finished
6 Hash method HExists HExists key field Checks whether the specified field exists in the specified hash key. @qishenonly  finished 
7 Hash method HKeys HKeys key Gets all field names in the specified hash key.    
8 Hash method HVals HVals key Gets all field values in the specified hash key.    
9 Hash method HLen HLen key Gets the number of fields in the specified hash key @qishenonly   finished
10 Hash method HGetAll HGetAll key Gets all fields and their values in the specified hash key.    

@qishenonly qishenonly added difficult:⭐⭐⭐⭐⭐ Up to five stars enhancement New feature or request labels Jul 3, 2023
CrazyJius pushed a commit that referenced this issue Jul 5, 2023
CrazyJius pushed a commit that referenced this issue Jul 5, 2023
CrazyJius pushed a commit that referenced this issue Jul 5, 2023
CrazyJius pushed a commit that referenced this issue Jul 5, 2023
CrazyJius pushed a commit that referenced this issue Jul 5, 2023
CrazyJius pushed a commit that referenced this issue Jul 5, 2023
CrazyJius pushed a commit that referenced this issue Jul 5, 2023
CrazyJius pushed a commit that referenced this issue Jul 5, 2023
CrazyJius pushed a commit that referenced this issue Jul 6, 2023
CrazyJius pushed a commit that referenced this issue Jul 6, 2023
CrazyJius pushed a commit that referenced this issue Jul 6, 2023
CrazyJius pushed a commit that referenced this issue Jul 6, 2023
CrazyJius pushed a commit that referenced this issue Jul 6, 2023
CrazyJius pushed a commit that referenced this issue Jul 6, 2023
CrazyJius pushed a commit that referenced this issue Jul 7, 2023
CrazyJius pushed a commit that referenced this issue Jul 7, 2023
qishenonly added a commit that referenced this issue Jul 7, 2023
qishenonly added a commit that referenced this issue Jul 7, 2023
saeid-a added a commit to saeid-a/FlyDB that referenced this issue Jul 9, 2023
@saeid-a
Copy link
Contributor

saeid-a commented Jul 9, 2023

#184

@saeid-a
Copy link
Contributor

saeid-a commented Jul 9, 2023

I've noticed the function decodeHashField in hash.go does not work; I mean, the way function encodeHashField encodes the HashField structure is impossible to decode since there are no delimiters; as a result, implementing the functions HKeys and HVals become very hard if not impossible. We can, however, rewrite the decode/encode functions using Golang's gob. Let me know what you think.

@qishenonly
Copy link
Member Author

Unfortunately, due to my personal development habits, I usually write the corresponding decodeHashField method after writing the encodeHashField method. However, when I wrote various methods of hash, I actually did not use the decoding method, which may have some problems.

For your consideration, perhaps you can try to use gob to rewrite the codec function part, it may not affect the functional implementation of other functions, but still have to actually run the test.

Thank you very much for your valuable comments.

@saeid-a
Copy link
Contributor

saeid-a commented Jul 10, 2023

#184

@qishenonly qishenonly assigned saeid-a and unassigned saeid-a Jul 10, 2023
@qishenonly
Copy link
Member Author

#184

thanks

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 added 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
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
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