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

add clear command to cli #7709

Merged
merged 1 commit into from
Dec 20, 2016
Merged

add clear command to cli #7709

merged 1 commit into from
Dec 20, 2016

Conversation

corylanou
Copy link
Contributor

@corylanou corylanou commented Dec 8, 2016

This command adds the ability to clear out settings in the cli such as database or retention policy. It can be expanded to clear other settings if needed in the future.

This become more of an issue once we introduced the ability to set the retention policy context in #7708

example usage:

> clear
Possible commands for 'clear' are:
    # Clear the database context
    clear database
    clear db

    # Clear the retention policy context
    clear retention policy
    clear rp
> use foo
Using database foo
> settings
Host                                                                                                            localhost:8086
Username
Database                                                                                foo
Pretty                                                                                          false
Format                                                                                          column
Write Consistency       all

> clear database
database context cleared
> settings
Host                                                                                                            localhost:8086
Username
Database
Pretty                                                                                          false
Format                                                                                          column
Write Consistency       all
Required for all non-trivial PRs
  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated
Required only if applicable

@corylanou corylanou force-pushed the cjl-cli-clear-command branch from 6caf5aa to 998c781 Compare December 8, 2016 16:04
Copy link
Contributor

@e-dard e-dard left a comment

Choose a reason for hiding this comment

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

Is clear database much different from use anotherDatabase?

What about if we just have a clear that can reset everything, as if you exited influx and started it again?

Just some thoughts. Otherwise LGTM 👍

@corylanou corylanou force-pushed the cjl-cli-clear-command branch from 998c781 to fbc9e3c Compare December 20, 2016 15:14
@corylanou corylanou merged commit f2ea3e1 into master Dec 20, 2016
@corylanou corylanou deleted the cjl-cli-clear-command branch December 20, 2016 15:54
@rkuchan rkuchan added this to the 1.2.0 milestone Dec 29, 2016
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