Skip to content

Conversation

@blakekrammes
Copy link
Collaborator

@blakekrammes blakekrammes commented Sep 20, 2024

This PR adds two tests for the query filter all functionality added by this PR #138.

In Mongo, the $all query filter returns documents containing all, but not limited to, the specified query parameters.

For example, if we have some documents

[
  {
    _id: 1,
    name: "Bob",
    email: "bob@me.com",
    tags: ["one", "two", "three", "four"]
  },
  {
    _id: 2,
    name: "Mary",
    email: "mary@me.com",
    tags: ["two", "four", "five", "seven"]
  },
  {
    _id: 3,
    name: "Bill",
    email: "bill@me.com",
    tags: ["three", "four", "six", "nine"]
  }
]

and we query with $all: { tags: { $all: ["two", "four"] } }

it will return the documents with _id: 1 and _id: 2.

@blakekrammes blakekrammes changed the title Add tests for query filter __all FIO-6593: Add tests for query filter __all Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants