We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using the $slice projection together with an exclusion projection, the operation should return all the other fields in the document. https://docs.mongodb.com/manual/reference/operator/projection/slice/#behavior
Monty DB is only returning the array that is sliced.
The text was updated successfully, but these errors were encountered:
failing tests:
def test_projection_slice_6(monty_proj, mongo_proj): docs = [ {"a": [0, 1, 2, 3, 4, 5, 6, 7], "x": 100, "y": 200} ] spec = {} def run(proj): monty_c = monty_proj(docs, spec, proj) mongo_c = mongo_proj(docs, spec, proj) assert count_documents(mongo_c, spec) == 1 assert count_documents(monty_c, spec) == count_documents(mongo_c, spec) assert next(mongo_c) == next(monty_c) proj = {"a": {"$slice": [-5, 4]}, "x": 1} run(proj) proj = {"a": {"$slice": [-5, 4]}, "x": 0} run(proj) def test_projection_slice_7(monty_proj, mongo_proj): docs = [ {"a": [0, 1, 2, 5, 6], "b": 7, "c": 9} ] spec = {} proj = {"_id": 0, "a": {"$slice": 3}} monty_c = monty_proj(docs, spec, proj) mongo_c = mongo_proj(docs, spec, proj) assert count_documents(mongo_c, spec) == 1 assert count_documents(monty_c, spec) == count_documents(mongo_c, spec) assert next(mongo_c) == next(monty_c) def test_projection_slice_8(monty_proj, mongo_proj): docs = [ {"a": [0, 1, 2, 5, 6], "b": 7, "c": 9} ] spec = {} proj = {"a": {"$slice": 3}} monty_c = monty_proj(docs, spec, proj) mongo_c = mongo_proj(docs, spec, proj) assert count_documents(mongo_c, spec) == 1 assert count_documents(monty_c, spec) == count_documents(mongo_c, spec) assert next(mongo_c) == next(monty_c)
Sorry, something went wrong.
Add test cases
e83e863
For #67, thanks to @thasler
No branches or pull requests
When using the $slice projection together with an exclusion projection, the operation should return all the other fields in the document.
https://docs.mongodb.com/manual/reference/operator/projection/slice/#behavior
Monty DB is only returning the array that is sliced.
The text was updated successfully, but these errors were encountered: