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

chore(drive)!: temporary restrictions for a document query #77

Merged
merged 10 commits into from
Jan 7, 2022

Conversation

shuplenkov
Copy link
Collaborator

@shuplenkov shuplenkov commented Dec 13, 2021

Issue being fixed or feature implemented

Since GroveDB doesn’t support indexes intersection, we need to validate query to make sure that only one index is being used. Also, there are some additional constraints due to the current GroveDB design. Potentially, they will be removed in the future.

What was done?

  • where conditions should follow a specific secondary index.
  • ranges can be used only in the last where condition.
  • sorting is allowed only for the last where condition and only for ranges.
  • elementMatch, contains and includes temporary disabled

How Has This Been Tested?

With unit and integration tests

Breaking Changes

  • where conditions should follow a specific secondary index
  • ranges can be used only in the last where condition
  • sorting is allowed only for the last where condition and only for ranges
  • elementMatch, contains and includes temporary disabled

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shuplenkov shuplenkov added this to the v0.22.0 milestone Dec 13, 2021
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to validate orderBy too

Copy link
Collaborator

@jawid-h jawid-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit

Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shumkov shumkov changed the title feat!: allow using only one index in a query feat(drive)!: allow using only one index in a query Jan 7, 2022
@shumkov shumkov merged commit dd6d9ee into v0.22-dev Jan 7, 2022
@shumkov shumkov deleted the multiple-indices branch January 7, 2022 15:57
@shumkov shumkov changed the title feat(drive)!: allow using only one index in a query chore(drive)!: temporary restrictions for a document query Jan 7, 2022
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.

3 participants