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

[partitioned dbs] Show results for partitioned views and All Docs filtered by partition key #1153

Conversation

Antonio-Maranhao
Copy link
Contributor

Overview

Fifth in a series of PRs that will be submitted in support of the new user-defined partitioned databases feature (apache/couchdb#1605).

Summary:

  • Show results for partitioned views
  • Filter All Documents by partition key (when one is selected)
  • Show warning message when a global view is selected and a partition key is selected
  • Show warning message when a partitioned view is selected but no key is selected

Testing recommendations

Scenario 1

  • Go to All Documents
  • In the Partition Selector, type in a key then press Enter
    • Verify the list of docs is updated to show only docs that match the partition key
  • Choose a different partition key
    • Verify the list of docs is updated again
  • Click the Filter icon in the Partition Selector to switch back to Global mode
    • Verify list of docs is updated

Scenario 2

  • Create a new view p1 in a new ddoc called ddocPartitioned
    - NOTE: at the moment, the Index Editor doesn't preserve the selected partition key. It'll be updated in a future PR
  • Type in a partition key then press Enter
    • Verify the view results is now displayed correctly
    • Verify the JSON and Metadata buttons are not visible
  • Click the Filter icon in the Partition Selector to switch back to Global mode
    • Verify a warning is displayed

Scenario 3

  • Create a new view g1 in a new ddoc called ddocGlobal
    • edit ddocGlobal and add "options": { "partitioned": false }
    • verify that ddocPartitioned and ddocGlobal have different icons on the sidebar
  • Click the g1 view
    • verify the results are displayed
  • Type in a partition key then press Enter
    • verify a warning is displayed

Related Pull Requests

apache/couchdb#1605

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;

Copy link
Member

@garrensmith garrensmith left a comment

Choose a reason for hiding this comment

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

Nicely done

@Antonio-Maranhao Antonio-Maranhao merged commit e73e942 into apache:master Nov 8, 2018
@Antonio-Maranhao Antonio-Maranhao deleted the partitioned-dbs-views-and-alldocs branch November 8, 2018 19:55
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