-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add Save() method #36
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @dbgjerez, thanks for the PR. I highlighted some adjustments to do before merging.
In particular, Save() can be implemented only using existing functions provided by the StorageEngine. Tests need to be revised, also.
EDIT: I also changed the title of the PR, because it was to generic ;=)
Totally agree with you @ostafen, I have modified the PR, I understand better this code thanks of you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @dbgjerez, sorry for the delay. I requested you some minor changes
Sure bro, I have done both changes. I think that really is better, like you said. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation of the Save()
functions looks good now.
Checks inside TestSaveDocument()
needs a minor revision because actually, by only testing the size of the collection with Count()
we can only be sure that some document is being saved, but we cannot be sure if the document is consistent.
Also, since we merged the tests, delete the TestSaveNewDocument()
function.
I think also that code will be easier to follow if we use string literals directly instead of defining these variables:
collection := "myCollection"
key := "hello"
updatedValue := "clover-updated!"
Thanks for your patience!
Ok, I have done the change and upload it. Thanks! |
Thank you for this! |
No description provided.