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

Test Documents Deletion with matching filter #167

Closed
shahzadlone opened this issue Feb 1, 2022 · 0 comments · Fixed by #206
Closed

Test Documents Deletion with matching filter #167

shahzadlone opened this issue Feb 1, 2022 · 0 comments · Fixed by #206
Assignees
Labels
area/testing Related to any test or testing suite

Comments

@shahzadlone
Copy link
Member

No description provided.

@shahzadlone shahzadlone added the area/testing Related to any test or testing suite label Feb 1, 2022
@shahzadlone shahzadlone added this to the DefraDB v0.2.1 milestone Feb 1, 2022
@shahzadlone shahzadlone self-assigned this Feb 1, 2022
shahzadlone added a commit that referenced this issue Feb 22, 2022
ISSUES:
Resolves #166
Resolves #167

DESCRIPTION:
Adds the ability to delete documents that match the given filter.
For example:
```
mutation {
    delete_user(filter: {name: {_eq: "Shahzad"}}) {
        DeletedKey: _key
    }
}
```
Gives this on successful deletion of all documents with name = `Shahzad`:
```
{
  "data": [
    {
      "DeletedKey": "bae-6a6482a8-24e1-5c73-a237-ca569e41507d"
    },
    {
      "DeletedKey": "bae-de1b3170-b0fa-5ae9-94d6-ae44ad560b24"
    }
  ]
}
```

COMMITS:
* feat: Add deletion of documents that match a filter
* test: Add tests for deletion of documents with a filter
* Adhere to code review.
* Only log on `query.Close()`, do not overwrite return values using named
returns.
shahzadlone added a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
…etwork#206)

ISSUES:
Resolves sourcenetwork#166
Resolves sourcenetwork#167

DESCRIPTION:
Adds the ability to delete documents that match the given filter.
For example:
```
mutation {
    delete_user(filter: {name: {_eq: "Shahzad"}}) {
        DeletedKey: _key
    }
}
```
Gives this on successful deletion of all documents with name = `Shahzad`:
```
{
  "data": [
    {
      "DeletedKey": "bae-6a6482a8-24e1-5c73-a237-ca569e41507d"
    },
    {
      "DeletedKey": "bae-de1b3170-b0fa-5ae9-94d6-ae44ad560b24"
    }
  ]
}
```

COMMITS:
* feat: Add deletion of documents that match a filter
* test: Add tests for deletion of documents with a filter
* Adhere to code review.
* Only log on `query.Close()`, do not overwrite return values using named
returns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Related to any test or testing suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant