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

Fix cmodels interface: separate insert and update document and return consistent objects #36

Open
jearistiz opened this issue May 1, 2021 · 0 comments
Labels
refactor Source code needs to be modified to meet new criteria

Comments

@jearistiz
Copy link
Member

  • Currently, the method CModelsInterface.insert_one_cmodel_document is not only inserting but updating the documents where necessary. Split this two functionalities and, if necessary, create a new one that inserts or updates accordingly.
  • The same method in question is not returning consistent type of objects e.g. when it does not insert a document because it exists exactly as it was pretended to be inserted, it returns the document to be inserted; when it updates the model because it existed but the newer document has updated information, it returns a bool and when it inserts a model that didn't exist, it returns the inserted model.
@jearistiz jearistiz added enhancement New feature or request help wanted Extra attention is needed labels May 1, 2021
@jearistiz jearistiz added refactor Source code needs to be modified to meet new criteria and removed enhancement New feature or request help wanted Extra attention is needed labels May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Source code needs to be modified to meet new criteria
Projects
None yet
Development

No branches or pull requests

1 participant