Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Add partition Index count to db info response.#478

Merged
smithsz merged 1 commit intomasterfrom
add-partition-index-meta
Mar 26, 2019
Merged

Add partition Index count to db info response.#478
smithsz merged 1 commit intomasterfrom
add-partition-index-meta

Conversation

@smithsz
Copy link
Copy Markdown
Contributor

@smithsz smithsz commented Mar 22, 2019

Checklist

  • Tick to sign-off your agreement to the Developer Certificate of Origin (DCO) 1.1
  • Added tests for code changes or test/build only changes
  • Updated the change log file (CHANGES.md|CHANGELOG.md) or test/build only changes
  • Completed the PR template below:

Description

This change adds the following fields to the db info response object for a partitioned database:

"partitioned_indexes": {
  "count": 7,
 "indexes": {
    "search": 1,
    "view": 6
  },
  "limit": 10
}

See https://github.com/cloudant/showroom/pull/233.

Approach

Add properties to the PartitionInfo class allowing the additional fields to be correctly deserialized.

Schema & API Changes

Includes new getters on the PartitionInfo class (non-breaking).

Security and Privacy

No change.

Testing

Includes additional mock unit tests.

Monitoring and Logging

No change.

Copy link
Copy Markdown
Contributor

@emlaver emlaver left a comment

Choose a reason for hiding this comment

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

looks good

*/
public class PartitionInfo {

public static class Indexes {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this belongs in DbInfo rather than PartitionInfo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, yes. I updated the wrong model here. Copied/pasted the new defs over to DbInfo.

@smithsz smithsz force-pushed the add-partition-index-meta branch from d157ce5 to 8eb98b5 Compare March 26, 2019 11:00
@smithsz smithsz force-pushed the add-partition-index-meta branch from 8eb98b5 to fa25318 Compare March 26, 2019 11:02
Copy link
Copy Markdown
Member

@ricellis ricellis left a comment

Choose a reason for hiding this comment

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

+1

@smithsz smithsz merged commit 30f5c4c into master Mar 26, 2019
@smithsz smithsz deleted the add-partition-index-meta branch March 26, 2019 11:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants